Let's say I have a Specular lighting Shader. It probably have lightsource's parameters. (Direction, intensity, etc). It does it's calculation and the graphic card use that to draw on the screen. This part is fine for me (At least if I'm not mistaken). But how is the Shader aware of the lightsource? I need to pass this information when I render with this Shader? Who check if the lightsource is blocked by another object before it reach my rendering object? Is it my scene renderer that need to make a check before it send the lightsource to the Shader?
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?
Edited by deathwearer, 06 December 2012 - 09:01 AM.