Ignore:
Timestamp:
07/07/06 17:01:28 (18 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_DepthShadow.hlsl

    r1060 r1102  
    2323{ 
    2424        float dist = length(IN.Position.xyz); 
    25         return float4(dist, dist, dist, 1);      
     25        return float4(dist, dist, dist, 1); 
     26        //return 1;      
    2627} 
    2728 
     
    5960        float4 shadowColor = float4(0.6, 0.6, 0.6, 1.0); 
    6061 
    61         float4 light1 = 1; 
    62         float4 light2 = 1; 
    63         float weight1 = 1; 
    64         float weight2 = 1; 
     62        float4 light1 = float4(1,1,1,1); 
    6563         
    6664        float4 lightCamPos1 = mul(lightView, IN.Position); 
     
    7270        float4 storedDepth1 = tex2D(depthShadowMap, lightScreenPos1.xy); 
    7371                if(storedDepth1.r + bias < d1) 
    74                         light1=0; 
     72                        light1 = shadowColor;    
    7573         
    7674         
    77         float4 lightCamPos2 = mul(lightView2, IN.Position); 
    78         float d2 = length(lightCamPos2.xyz); 
    79          
    80                          
    81         float4 lightScreenPos2 = mul(lightViewProj2, IN.Position); 
    82         lightScreenPos2 = lightScreenPos2 / lightScreenPos2.w ;  
    83  
    84         if(abs(lightScreenPos2.x) < 0.99 && abs(lightScreenPos2.y) < 0.99 ) 
    85         { 
    86                 lightScreenPos2 = ( lightScreenPos2 + 1.0 ) / 2.0; 
    87                 lightScreenPos2.y = 1.0 - lightScreenPos2.y; 
    88                 float4 storedDepth2 = tex2D(depthShadowMap2, lightScreenPos2.xy); 
    89                         if(storedDepth2.r + bias < d2) 
    90                                 light2=0;        
    91         } 
    92         else 
    93                 weight2 = 0; 
    94                  
    95         weight1 = 1 - weight2;   
    96                  
    97         return saturate((light1*weight1 + light2*weight2) + shadowColor);        
     75        return light1;   
    9876} 
    9977 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.material

    r1094 r1102  
    137137} 
    138138 
     139material GameTools/FocusingShader 
     140{  
     141 
     142   technique  
     143   {  
     144      scene_blend none 
     145 
     146      pass  
     147      {  
     148         vertex_program_ref GameTools/FocusingVS 
     149         {        
     150            param_named_auto worldView worldview_matrix 
     151            param_named_auto worldViewProj worldviewproj_matrix 
     152            param_named lightTransform matrix4x4          
     153         }  
     154         fragment_program_ref  GameTools/FocusingPS 
     155         {  
     156            
     157         } 
     158 
     159       } 
     160    } 
     161} 
     162 
    139163material GameTools/ShadowMapDepth 
    140164{  
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.program

    r1060 r1102  
     1vertex_program GameTools/FocusingVS hlsl 
     2{ 
     3        source GameTools_Focusing.hlsl 
     4        entry_point FocusingVS 
     5        target vs_2_0 
     6}  
     7 
     8fragment_program GameTools/FocusingPS hlsl 
     9{ 
     10        source GameTools_Focusing.hlsl 
     11        entry_point FocusingPS 
     12        target ps_2_0 
     13}  
     14 
    115vertex_program GameTools/PostProc1_VS hlsl 
    216{ 
Note: See TracChangeset for help on using the changeset viewer.