i'm trying to make a macroquad::material that i can use to apply a checkerboard effect that subtracts the alpha from a texture being rendered. however, i'm not sure how to get the uv coordinate in pixels into the fragment shader. using the raw uv coordinates doesn't yield the correct results. (left is current shader, middle is original sprite, right is the result i'm aiming for)
#Get texel size in fragment shader with Macroquad
4 messages · Page 1 of 1 (latest)
actually. i just found a link to the macro/miniquad discord. should i delete this post? i don't want to clutter the forum with questions that would fit better somewhere else
Maybe using https://registry.khronos.org/OpenGL-Refpages/gl4/html/textureSize.xhtml to compute pixel sizes in uv coordinates?
oh thanks i'll look into this!