Hi guys, We would like to reduce the cost of dynamic shadows in our game, in terms of the extra draw calls. Our game has dynamically-generated levels so lightmapping isn't an option for us. We do, however, have the luxury of: 1) all our shadows are from a single directional light 2) our shadow-casting d-light never changes intensity or facing 3) 99% of our props cast shadows all the time. We also have doors that cast shadows. They start out closed but once they're opened, they stay open and we can remove shadow casting from them forever. To reduce the # of draw calls needed for dynamic shadows, is there any way we can capture the shadow map during one render, and then use that for the rest of the game? For this to work: 1) render one frame with some sort of replaced shadow-casting shader 2) save that texture into a global texture that can be referenced in any other shader 3) shaders for any shadow receiver will sample that map manually Does this sound remotely feasible?
It is completely feasible. I got exactly this working for point lights @ my thread , but no directional light support yet.
It does. Maybe it's able to be changed to shader model 2.0 - didn't try it since nearly all gpu's are SM 3.0+ by now