Quote:
I've had a look at the source and it's pretty simple and fast but could even be a little faster:

float zProj = pow(abs(dot(input.Normal, float3(0.f, 1.f, 0.f))), ProjectionPower);
is obviously the same as
float zProj = pow(abs(input.Normal.y), ProjectionPower);
which can be shortened to
float zProj = input.Normal.y*input.Normal.y;
as ProjectionPower = 2 apparently gives the best results (the same goes for zProjx/y, of course).

oh, of course... didn't see this crazy
Thx for pointing this out laugh

EDIT: about Hummel's 'Ehec' shader: I saw his shader but I didn't knew he was using the same technique smirk

Last edited by Kartoffel; 11/21/12 21:45.

POTATO-MAN saves the day! - Random