Members - Reputation: 745
Posted 13 March 2012 - 10:55 AM
on to my questions though. So my compute shader takes a buffer of point lights, and determines which lights are visible for each tile, and then executes the lighting equation. this is standard.
1)if i wanted to add in spot lights, what would be the best approach.
-expand my pointLight structure to house the additional properties needed, and then also add a type member so that the shader knows which lighting and frustum culling method to use?
-create a seperate light buffer just for the spot lights, and add an extra pass via the compute shaders to run thru the spot lights?
2) since i have this nice buffer of lights, is there any way i can utilize it inside of a compute shader to handle shadows?
-i am pretty sure i can't do the shadow calcuation at the same time as the lighting calcuations.... or is there....
thanks much in advance
Moderators - Reputation: 18034
Posted 13 March 2012 - 12:42 PM
For #2, you're going to need to render your shadow maps ahead of time. To make it a bit easier on yourself you can use a texture array.
Prime Members - Reputation: 1035
Posted 13 March 2012 - 01:42 PM
Gonna try that "Indie" stuff I keep hearing about. Let's start with Splatter.