Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LE is up - hoping it'll be a good prototype for new features
06-18-2010, 01:11 AM,
#5
 
Sure.

This is the way that lighting works in the deferred renderer: postprocess the gbuffer with a shader that accumulates the contribution from the light. Instead of postprocessing the entire screen, an optimization is to only postprocess the set of pixels that the light will affect. For a point light, we can roughly get the pixels affected by a light by rendering the backfaces of a bounding cube (we must render backfaces in case the camera is inside the cube).

This particular bit of code was a test that explicitly set up the bounding cube and its properties; eventually I'll make it so you can call a function to set up the point light with position, radius, and color.
Reply


Messages In This Thread
[No subject] - by NaN - 06-17-2010, 03:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-17-2010, 10:32 AM
[No subject] - by NaN - 06-17-2010, 10:40 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 01:11 AM
[No subject] - by NaN - 06-18-2010, 07:11 AM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 10:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 06-18-2010, 10:15 PM
[No subject] - by zimluura - 06-19-2010, 11:20 AM
[No subject] - by NaN - 06-19-2010, 07:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)