-I am trying to get bump mapping with multiple lights.
-I have stencil shadows and the scene is drawn one light by one light.
-Each “light pass” is added to the previous one using additive blending.
-I need 2 passes to get my bump (I have a GeForce 2) for each light.
The result is really bad.
F: frame buffer
N: dot3 pass
D: diffuse pass
For now it is:
F = (N+F)*D
What I need (I think):
F = F + (N * D)
The solutions I have are:
- buy something better than a GeForce 2 to do my bump in only one pass.
- find register/blending/texture settings to do it (I don’t know if it is possible)
- use the accumulation buffer.
I’d like to try the third one like this:
for each light
clear the frame buffer
// here I already have my stencil shadows
render the objects using as many passes they need
if first light
copy the frame buffer to the accumulation buffer
add the frame buffer to the accumulation buffer
copy accumulation buffer to the frame buffer
Is the second solution possible ?
Is the third solution possible ?