Hi
i know it clearing a z buffer is expensive, but I still have a strange behaviour. I use shadow map so i need to use a z buffer for the shadow.
my shadow map is quite big (2048*2048), i know me crazy. I should off course clear this buffer each frame, but if i do so the performance drop (from 200 fps to 70 fps). So i simulate a fast clear with a pixel shader. In fact this allow me a lot of other optimisations wich make the shadow map generation very fast (like 5% of the total rendering time), so I am pretty happy with it.
anyway i wonder if its normal for the z clear to be so slow. (because some time i need to clear the buffer, and when i do we can feel a little break in the animation).
is there an optimum time to make the zclear (curently it's made in the middle of the render). I tried to make it at the begining of the render, but as I need to change the rendertarget to clear the z that wasn't efficient.
is there a way to clear the z even if it's not the active zbuffer?
thanks
i know it clearing a z buffer is expensive, but I still have a strange behaviour. I use shadow map so i need to use a z buffer for the shadow.
my shadow map is quite big (2048*2048), i know me crazy. I should off course clear this buffer each frame, but if i do so the performance drop (from 200 fps to 70 fps). So i simulate a fast clear with a pixel shader. In fact this allow me a lot of other optimisations wich make the shadow map generation very fast (like 5% of the total rendering time), so I am pretty happy with it.
anyway i wonder if its normal for the z clear to be so slow. (because some time i need to clear the buffer, and when i do we can feel a little break in the animation).
is there an optimum time to make the zclear (curently it's made in the middle of the render). I tried to make it at the begining of the render, but as I need to change the rendertarget to clear the z that wasn't efficient.
is there a way to clear the z even if it's not the active zbuffer?
thanks