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…
Ah yes, that's going to be tough, because Diffusion... won't have access to that uniform (it's called within another lighting function, so passing uScreenTexCoordScaleBias to it directly won't work, as you've noticed). Another workaround: define the Premerge() subroutine in addition to your diffusion function, and in…
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…