- Timestamp:
- 07/03/07 15:49:12 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/Station/stationIllum.hlsl
r2474 r2507 15 15 L = normalize(L); 16 16 17 #ifdef HIGH_QUALITY17 //#ifdef HIGH_QUALITY 18 18 19 19 //Phong-Blinn … … 23 23 24 24 float lightAngleCos = cos(70.0 / 180.0 * 3.14); 25 float falloff = ( dot(-L, lightDir) - lightAngleCos) / (1.0 - lightAngleCos);25 float falloff = (max(dot(-L, lightDir), 0) - lightAngleCos) / (1.0 - lightAngleCos); 26 26 falloff = pow(saturate(falloff), 2); 27 27 … … 31 31 ; 32 32 33 #else33 //#else 34 34 35 return lightColor * diffuseColor * dot(L,N) * pow(max(dot(-L, lightDir),0),9) / (3*d*d);35 // return lightColor * diffuseColor * dot(L,N) * pow(max(dot(-L, lightDir),0),9) / (3*d*d); 36 36 37 #endif37 //#endif 38 38 } 39 39
Note: See TracChangeset
for help on using the changeset viewer.