Ignore:
Timestamp:
06/24/07 10:58:31 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r2417 r2458  
    1010uniform sampler2D bumpMap : register(s1); 
    1111 
    12 uniform float4 lightRange; 
    13 uniform float lightPower; 
    14 uniform float4 lightColor; 
     12uniform float4 lightRange1; 
     13uniform float lightPower1; 
     14uniform float4 lightColor1; 
     15 
     16uniform float4 lightRange2; 
     17uniform float lightPower2; 
     18uniform float4 lightColor2; 
    1519 
    1620uniform float specularity; 
     
    2731        float3 normal:TEXCOORD3; 
    2832        float3 V: TEXCOORD4; 
    29         float3 L: TEXCOORD5; 
     33        float3 L1: TEXCOORD5; 
     34        float3 L2: TEXCOORD6; 
    3035}; 
    3136 
     
    3641        float dist = length(IN.V); 
    3742        float3 V = IN.V /dist; 
    38         float3 L = IN.L; 
     43        float3 L1 = IN.L1; 
     44        float3 L2 = IN.L2; 
    3945         
    4046        float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 
    41          
    42         Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 
     47        if(lightPower1 != 0) 
     48        Color += Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 
     49        if(lightPower2 != 0) 
     50        Color += Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 
    4351         
    4452        float4 ret =  Color; 
Note: See TracChangeset for help on using the changeset viewer.