Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualRadikalizm

Posted 06 December 2012 - 09:56 AM

The graphics API you're using will provide ways for you to submit data to your shaders, so depending on what kind of setup you're using you can check which lights should light an object (note: I'm not talking about actual occlusion/shadows here) and you can send all the light data required to your shader before you render your object.

Occlusion and shadows can be done on the GPU, so your renderer doesn't have to take care of that on the CPU-side. Have a look at shadow mapping to see how occlusion is done (be prepared to do a lot of reading though, it's a very broad subject). Shadow mapping isn't the only solution for this though, but it's the most popular one at the moment.

Also is it possible that your Shader communicate with your game/other shader? In the case of a high reflectance surface could your Shader "re-emit" light that will be taken in consideration when rendering other objects?


Light bouncing off objects is called Indirect Illumination (sometimes also called Global Illumination) and is quite an advanced subject. Note that indirect illumination doesn't only come into play for highly reflective surfaces, every 'colored' surface will bounce off light. There are techniques to achieve indirect lighting in real-time on the GPU, but there are also techniques for pre-calculating this on the CPU. Each technique has its pro's and its cons though, in general indirect illumination is still very expensive in real-time applications and mostly cuts corners here and there to achieve actual usable results, while pre-calculated results can get accurate (diffuse only) results as long as no lights or objects in the scene move. There's still a lot of research being done on this subject, and some amazing techniques have been developed for future applications (have a look at "Interactive Indirect Illumination Using Voxel Cone Tracing" by C. Crassin for such a technique).

#1Radikalizm

Posted 06 December 2012 - 09:55 AM

The graphics API you're using will provide ways for you to submit data to your shaders, so depending on what kind of setup you're using you can check which lights should light an object (note: I'm not talking about actual occlusion/shadows here) and you can send all the light data required to your shader before you render your object.

Occlusion and shadows can be done on the GPU, so your renderer doesn't have to take care of that on the CPU-side. Have a look at shadow mapping to see how occlusion is done (be prepared to do a lot of reading though, it's a very broad subject)

Also is it possible that your Shader communicate with your game/other shader? In the case of a high reflectance surface could your Shader "re-emit" light that will be taken in consideration when rendering other objects?


Light bouncing off objects is called Indirect Illumination (sometimes also called Global Illumination) and is quite an advanced subject. Note that indirect illumination doesn't only come into play for highly reflective surfaces, every 'colored' surface will bounce off light. There are techniques to achieve indirect lighting in real-time on the GPU, but there are also techniques for pre-calculating this on the CPU. Each technique has its pro's and its cons though, in general indirect illumination is still very expensive in real-time applications and mostly cuts corners here and there to achieve actual usable results, while pre-calculated results can get accurate (diffuse only) results as long as no lights or objects in the scene move. There's still a lot of research being done on this subject, and some amazing techniques have been developed for future applications (have a look at "Interactive Indirect Illumination Using Voxel Cone Tracing" by C. Crassin for such a technique).

PARTNERS