- Home /
What's the Unity shader equivalent of gl_FragCoord?
...and please don't say "WPOS" because I've tried that and it doesn't work. The reason I'm asking this is because I need to, in a fragment shader, sample a texture based on fragment coordinates (sort of like a post-processing effect but I don't have a full screen quad [since this is happening in a normal shader] and its uv's to work with). I've been searching for hours on how to do this and can't figure it out. Help?
Comment
Still haven't found a solution to this, is it just impossible to get the fragment coordinates in Unity or what?