You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, that project development is stopped, but I need fix a legacy code: draw Vignette effect programmatically on the sprite. I started from adaptation this shader: https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson3 without sepia and other effects, but still not know, how to pass "resolution" vector analog. Currently, I'm passing sprite's width & height, but result light spot is not on center. Maybe, there are some another way to get normalized texture coordinates?
Shader is copied from PositionColorTextureCoordinatesShaderProgram
Fragment shader is defined as follows:
I know, that project development is stopped, but I need fix a legacy code: draw Vignette effect programmatically on the sprite. I started from adaptation this shader: https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson3 without sepia and other effects, but still not know, how to pass "resolution" vector analog. Currently, I'm passing sprite's width & height, but result light spot is not on center. Maybe, there are some another way to get normalized texture coordinates?
Shader is copied from PositionColorTextureCoordinatesShaderProgram
Fragment shader is defined as follows:
where UNIFORM_RESOLUTION is 2d array with sprite width & height bound. Maybe, I have to pass another values here?
The text was updated successfully, but these errors were encountered: