Changeset 2422 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Timestamp:
- 06/08/07 00:05:53 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasicShading.hlsl
r2414 r2422 59 59 float cosb = max(dot(IN.wNormal.xyz, diff), 0); 60 60 61 //color.rgb += pow(cosa, 9) * cosb / dist2 * lightPower1 * lightColor1;62 color.rgb += cosb / dist2 * lightPower1 * lightColor1;61 color.rgb += pow(cosa, 9) * cosb / dist2 * lightPower1 * lightColor1; 62 //color.rgb += cosb / dist2 * lightPower1 * lightColor1; 63 63 64 64 } 65 65 /* 66 66 { 67 67 float3 lightDir = normalize(lightDir2); … … 75 75 float cosb = max(dot(IN.wNormal.xyz, diff), 0); 76 76 77 //color.rgb += pow(cosa, 9) * cosb / dist2 * lightPower2 * lightColor2;78 color.rgb += cosb / dist2 * lightPower1 * lightColor1;77 color.rgb += pow(cosa, 9) * cosb / dist2 * lightPower2 * lightColor2; 78 //color.rgb += cosb / dist2 * lightPower1 * lightColor1; 79 79 } 80 80 */ 81 81 //color.rgb *= lightPower; 82 82 //return 0; 83 return color* tex2D(colorTex, IN.texCoord);83 return (color) * tex2D(colorTex, IN.texCoord); 84 84 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowMap_PS.hlsl
r2404 r2422 19 19 #define DIST_EPSILON 0.001 20 20 21 //#define shadowColor float4(0.9 ,0.9,0.9,1)21 //#define shadowColor float4(0.95,0.95,0.95,1) 22 22 #define shadowColor float4(0.2,0.2,0.2,1) 23 23 … … 88 88 pos.y = 1.0 - pos.y; 89 89 float storedDist = tex2D(shadowMap, pos.xy).r; 90 light = max(dist < storedDist + DIST_BIAS, shadowColor);91 90 light = dist < storedDist + DIST_BIAS; 92 91 //if(dist < storedDist + DIST_BIAS) 93 // light = 1;92 // light = 1; 94 93 } 95 94 } 96 95 light = max(light, shadowColor); 96 97 97 return light; 98 98 }
Note: See TracChangeset
for help on using the changeset viewer.