- Timestamp:
- 05/16/07 08:33:51 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl
r2373 r2376 41 41 42 42 uniform float specularity; 43 uniform float4 specularColor; 43 44 44 45 … … 96 97 //light1 97 98 //light dir 98 float3 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 99 float3 L; 100 float4 col; 101 float3 lightCPos; 102 float shadow; 103 104 if(dot(lightColor1, lightColor1) != 0) 105 { 106 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 99 107 //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); 102 109 //shadowing 103 float3lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz;104 floatshadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1);110 lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz; 111 shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 105 112 Color += col * shadow; 113 } 106 114 107 115 //---------------------------------------------------------------------------------------------------------------- 108 116 //light2 117 /*if(dot(lightColor2, lightColor2) != 0) 118 { 109 119 //light dir 110 120 L = wLightPos2.xyz - IN.wPos * wLightPos2.w; 111 121 //illumination 112 col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity );122 col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 113 123 //shadowing 114 124 lightCPos = mul(LightView2, float4(IN.wPos, 1)).xyz; 115 125 shadow = shadowPoint(ShadowMap2Point, lightCPos, lightFarPlane2); 116 126 Color += col * shadow; 127 }*/ 117 128 118 129 //do Path Map to gather indirect illumination 119 130 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; 123 134 124 135 //gather caustics for all casters
Note: See TracChangeset
for help on using the changeset viewer.