Ignore:
Timestamp:
06/08/07 00:05:53 (17 years ago)
Author:
szirmay
Message:
 
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  
    5959        float cosb = max(dot(IN.wNormal.xyz, diff), 0); 
    6060         
    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; 
    6363         
    6464        } 
    65          
     65        /* 
    6666        { 
    6767        float3  lightDir = normalize(lightDir2); 
     
    7575        float cosb = max(dot(IN.wNormal.xyz, diff), 0); 
    7676         
    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;         
    7979        }        
    80          
     80        */ 
    8181        //color.rgb *= lightPower; 
    8282        //return 0; 
    83         return color * tex2D(colorTex, IN.texCoord); 
     83        return  (color) * tex2D(colorTex, IN.texCoord); 
    8484} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowMap_PS.hlsl

    r2404 r2422  
    1919#define DIST_EPSILON    0.001 
    2020 
    21 //#define shadowColor float4(0.9,0.9,0.9,1) 
     21//#define shadowColor float4(0.95,0.95,0.95,1) 
    2222#define shadowColor float4(0.2,0.2,0.2,1) 
    2323 
     
    8888                pos.y = 1.0 - pos.y; 
    8989                float storedDist = tex2D(shadowMap, pos.xy).r; 
    90                 light = max(dist < storedDist + DIST_BIAS, shadowColor);     
    9190                light = dist < storedDist + DIST_BIAS; 
    9291                //if(dist < storedDist + DIST_BIAS) 
    93                 //light = 1; 
     92                //      light = 1; 
    9493    } 
    9594  } 
    96          
     95  light = max(light, shadowColor);     
     96                         
    9797  return light; 
    9898} 
Note: See TracChangeset for help on using the changeset viewer.