Changeset 2392 for GTP/trunk


Ignore:
Timestamp:
05/23/07 13:20:43 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
7 added
2 edited

Legend:

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

    r2376 r2392  
    5050            uniform float farplane, 
    5151            uniform float4 lightCPos, 
     52            uniform float lightPower, 
    5253        uniform float4 color, 
    5354        uniform float symmetry, 
     
    8586         
    8687        //illumination 
    87         float3 L = normalize(lightCPos - IN.Q * lightCPos.w); 
     88        float3 L = lightCPos - IN.Q * lightCPos.w; 
     89        float ld = length(L); 
     90        L = L / ld; 
    8891        float3 V = normalize(-IN.Q); 
    89         float phase = tex2D(PhaseMap, float2(symmetry, dot(L,V)) * 0.5 + 0.5).r; 
     92        float phase = /*lightPower / (ld*ld) * */tex2D(PhaseMap, float2(symmetry, dot(L,V)) * 0.5 + 0.5).r; 
    9093//      float phase = (dot(L, V) + 1.0) * 0.5; 
    9194        Color.rgb *= phase; 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaDust.material

    r2376 r2392  
    4545                        param_named symmetry float 0.1   
    4646                        param_named_auto lightCPos light_position_view_space 0 
     47                        param_named_auto lightPower light_power 0 
    4748                        } 
    4849                        texture_unit 
Note: See TracChangeset for help on using the changeset viewer.