this will be very silly question indeed, but I’ve been looking on the internet for about week now, without any success…
I’ve got stencil shadows implemented (without shaders) and per pixel lighting shader implemented. And I want to put it all together…but my problem is that I don’t know how to acess stencil buffer in my lighting shader and I don’t want to pass it as some texture, or do I have to ?
Or is there some way to bypass stencil buffer and use the shadow volumes in my per pixel lighting sgader ?
So can someone please explain this to me or point me to some sources where it is.