Issues

Issue #435 resolved

PixelEffects have flipped screen_coords.y (bugfix of a bugfix???)

xgoff
created an issue

the following shader code: {{{

!text

extern vec2 ul, lr; vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ) { vec2 coords = (screen_coords.xy - ul.xy) / (lr.xy - ul.xy);

return vec4(coords.x, coords.y, 0.0, 1.0);

} }}}

when given the position of the upper left and lower right corners of a drawn rectangle, should effectively duplicate the behavior of texture_coords, but without requiring a texture. however, the y-coordinate of screen_coords is flipped, preventing this from working unless the programmer manually corrects it.

probably related in ways to #324

this is especially noticeable when, say, you want a shader effect to be relative to some shape's position

Comments (6)

  1. vrld

    Reopened as of b3305085b712.

    Marking it as wontfix, because every time we try to tackle one of the problems related to the coordinate system, canvases and pixels we open up another issue. :/

  2. Log in to comment