#Creating screen reading shader with SCREEN_PIXEL_SIZE not working, alternative solution?
1 messages · Page 1 of 1 (latest)
right picture is when I zoom out
I'm having the same issue trying to create a drop shadow
well, the shader is applied per pixel right?
how big are the pixels when you zoom out?
My game is rendered at 1920x1080, in game it looks wrong. I just don't understand how it works really
you mean how shaders work?
For canvas_item shaders, when you set the COLOR in the fragment function, you are setting it for one pixel
No how I get it to render properly in the right position
I have been looking up how to make a pixel outline shader and I get how it works, but it doesn't work when I'm sampling the texture on the screen instead of having some texture from memory
Oh, you're using a screenreading shader?
I'm not sure there would be transparency in the texture from a screen-reading shader
No there isn't, that's why I make the text pink
And check to see if the pixel is pink
The outline works as shown in the picture the problem is the zooming
And rendering properly for the resolution
Lmao
your text is pink right?
Yeah vec4(0.0,1.0,0.0,1.0)
that's green
I think you mean that it's checking the distance from green
pink is the opposite of green
Well that would explain it
anyway i will go through the shader code
Why do you multiply the pixel size by 8?
current_pixel = texture(_texture, uv_coord + DIRECTIONS[i] * pixel_size*8.0);
When people make the shader that is the pixel thickness in their shaders
But the pixel thickness is already "pixel_size"
Ok I'll try without it
Aaaaah
Sick
I'm having trouble doing the same thing with a shadow shader but I'll keep this in mind when I'm having the issue
okay 👍
Thank you so much