Ok, so I definitely hit a wall. No matter what I try I cannot pass uScreenTexCoordScaleBias into my function once i'm trying to do it in the diffusion subroutine instead of albedo. I'm sure it has something to do with the way I wrote the macro because I don't really understand how macros work... Either way, here's the code…
Hey guys, I'm currently writing a custom shader that makes heavy use of screen space UV's. The problem is, I can't seem to find a way to access the screen resolution/aspect ratio, so the textures I run in screenspace are stretched horizontally. I'd also like to scale the UV's based on distance from camera, which I also…
oh! great! I'll try that when I get home tonight. I might also have more questions, the main part of the shader I'm making is in the diffusion subroutine. I was trying to pass uScreenTexCoordScaleBias into my function as I did in the albedo one above, and it was failing every time. I'm not exactly sure what I was doing…
Hey Jeff, Thanks for the reply! I was able to get the aspect ratio correction working! Scaling the texture by depth proved a lot tricker though, your suggestion did work in theory, but since its doing it per fragment, the texture starts to get insane at certain distances/angles. What I really want is to scale the texture…