PDA

View Full Version : about per-pixel lighting



glWander
02-22-2005, 08:24 AM
I wanna render more than 2 lights onto some geometry, each light cast Dot3-bumpmapping, so it must be implemented with fragment program.I render each light and blend the result into framebuffer by glBlendFunc(GL_ONE, GL_ONE), it looks good, but got terrible performence. Is there any other way can do this job with higher performence?

azazello
02-22-2005, 10:38 AM
try to use longer fp/vp program(shader) for two lights calculation in one pass.

zed
02-22-2005, 11:30 AM
limit the drawing to only the areas that recieve parts of the light, ie dont draw the whole viewfrustum with each light