Well... getting the normals and depth is pretty easy, but I still don't know how the lightss should be calculated with deferred rendering.
I already looked at a lot of websites but this didn't help me.

At the moment I'm using this:

[Color of the Pixel] = [Color] * ( ( [Distance to the Light] - [Lightrange] ) - [Difference between Pixel-Normal and Light-Direction] ) * [Light Color];

Works fine, but I think it isn't the right way to calculate this.


Another thing is, that I'm currently using vecSkill1 and vecSkill5 to give the Light information (RGB, Range, Position) to the shader.

Is there a way to read the Light information passed by the engine?

(EDIT: This might belong to the Shaders forum, sorry)

Last edited by Kartoffel; 06/01/12 09:52.

POTATO-MAN saves the day! - Random