Ignore:
Timestamp:
05/16/07 08:33:51 (17 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r2373 r2376  
    4141 
    4242uniform float specularity; 
     43uniform float4 specularColor; 
    4344 
    4445 
     
    9697//light1                 
    9798        //light dir 
    98         float3 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 
     99float3 L; 
     100float4 col; 
     101float3 lightCPos; 
     102float shadow; 
     103 
     104if(dot(lightColor1, lightColor1) != 0) 
     105{ 
     106        L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 
    99107        //illumination 
    100         float4 col; 
    101         col = Illumination(N, L, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity); 
     108        col = Illumination(N, L, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 
    102109        //shadowing      
    103         float3 lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz; 
    104         float shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 
     110        lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz; 
     111        shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 
    105112        Color += col * shadow;   
     113} 
    106114 
    107115//---------------------------------------------------------------------------------------------------------------- 
    108116//light2                         
     117/*if(dot(lightColor2, lightColor2) != 0) 
     118{ 
    109119        //light dir 
    110120        L = wLightPos2.xyz - IN.wPos * wLightPos2.w; 
    111121        //illumination 
    112         col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity); 
     122        col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 
    113123        //shadowing      
    114124        lightCPos = mul(LightView2, float4(IN.wPos, 1)).xyz; 
    115125        shadow = shadowPoint(ShadowMap2Point, lightCPos, lightFarPlane2); 
    116126        Color += col * shadow;   
     127}*/ 
    117128         
    118129        //do Path Map to gather indirect illumination 
    119130         
    120         float4 indirect = PathMapIndirect(PathMap, WeightIndexMap, WeightMap, IN.texCoord2.zw) * 1.2; 
    121         indirect *= diffuseColor; 
    122         Color = Color + indirect; 
     131//      float4 indirect = PathMapIndirect(PathMap, WeightIndexMap, WeightMap, IN.texCoord2.zw) * 1.2; 
     132//      indirect *= diffuseColor; 
     133//      Color = Color + indirect; 
    123134         
    124135        //gather caustics for all casters 
Note: See TracChangeset for help on using the changeset viewer.