I was using xXxMoNkEyMaNxXx's Textured polygon's module to achieve this effect on LÖVE 11.1: https://www.youtube.com/watch?v=AMZxC9aE7wo
This would be the background for a frontend I'm developing for a Rockchip RK3066 board. However, although its renderer info says "OpenGL ES 2.0", even a simple shader like drawing all pixels red affects makes performance drop 10fps (20fps with xXxMoNkEyMaNxXx's's shader, which also doesn't display correctly), so I have to either figure out another way to make it or just forget about it.
I was trying with a mesh, but I get the usual "bad perspective" look:
I tried adding more vertices but I don't think I'll get a nice look with this.
Before dropping this feature, I'd like to ask for any advice you might have.
Thanks a lot in advance
Is it possible to make an animated perspective texture WITHOUT a shader?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Is it possible to make an animated perspective texture WITHOUT a shader?
You could try using a vertex shader instead of a pixel shader; I don't actually know how much they affect performance, but I'd guess much less since the code only runs once per vertex instead of once per pixel
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: Is it possible to make an animated perspective texture WITHOUT a shader?
Try the examples in this thread: viewtopic.php?p=219237#p219237 (demo3d3 and rctest3)
Re: Is it possible to make an animated perspective texture WITHOUT a shader?
Wow... Thank you very much, pgimeno! :O
With your lib I get around 40fps on my app displaying a couple of perspective textures, but more important: it actually works! The other shader just made the screen blink ^^U
I'm having a friend helping me on this project building LÖVE for the Rockchip (he's currently trying to implement triple buffer on SDL hoping to get a performance boost), so we might get to 60fps. Crossing fingers!
-----
[EDIT]
I just noticed that, with vsync disabled, I get ~470fps on my laptop if I don't animate the mesh's UVs, going down to ~300fps if I do, which seems a bit too much, doesn't it?
I'm using this function in love.update (CUIBg is a class for the all elements in the background):
More precisely, it's the line "self.rc.mesh:setVertex( i, { x, y, z, u, v, r, g, b, a } )" that drops performance so much. "getVertex" doesn't seem to affect.
Am I animating UVs correctly? Is there a more efficient system to animate a mesh's UVs?
With your lib I get around 40fps on my app displaying a couple of perspective textures, but more important: it actually works! The other shader just made the screen blink ^^U
I'm having a friend helping me on this project building LÖVE for the Rockchip (he's currently trying to implement triple buffer on SDL hoping to get a performance boost), so we might get to 60fps. Crossing fingers!
-----
[EDIT]
I just noticed that, with vsync disabled, I get ~470fps on my laptop if I don't animate the mesh's UVs, going down to ~300fps if I do, which seems a bit too much, doesn't it?
I'm using this function in love.update (CUIBg is a class for the all elements in the background):
Code: Select all
function CUIBg:UpdatePerspectiveTestUVs(dt)
local inc = 1.6
for i = 1, self.rcVertextCount, 1 do
local x, y, z, u, v, r, g, b, a = self.rc.mesh:getVertex( i )
v = v - inc * dt
self.rc.mesh:setVertex( i, { x, y, z, u, v, r, g, b, a } )
end
end
Am I animating UVs correctly? Is there a more efficient system to animate a mesh's UVs?
Re: Is it possible to make an animated perspective texture WITHOUT a shader?
I'm currently using pgimeno's lib, which uses a vertex shader drawing a texture on a mesh. Do you mean I should animate the UVs in the very shader instead of on the mesh?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 7 guests