Ignore:
Timestamp:
05/28/07 17:00:18 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl

    r2389 r2398  
    3333        float4 Color = 0; 
    3434        float3 N = normalize(IN.normal);//NormalMap(IN.tangent, IN.binormal, IN.normal, IN.texCoord, bumpMap); 
    35         float3 V = normalize(IN.V); 
     35        float dist = length(IN.V); 
     36        float3 V = IN.V /dist; 
    3637        float3 L = IN.L; 
    3738         
     
    4041        Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 
    4142         
    42         return diffuseColor * 0.1 + Color; 
     43        float4 ret =  diffuseColor * 0.1 + Color; 
     44        return float4(ret.xyz, dist); 
    4345} 
Note: See TracChangeset for help on using the changeset viewer.