Changeset 2294


Ignore:
Timestamp:
03/27/07 11:55:42 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials
Files:
1 added
17 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic.material

    r2284 r2294  
    4444  pass mainpass 
    4545  { 
    46    cull_hardware clockwise 
     46   cull_hardware none 
    4747   vertex_program_ref GTP/Basic/VPos_VS 
    4848   {   
     
    6969material GTP/Basic/CameraDepth 
    7070{ 
    71  technique 
    72  { 
    73   pass 
     71 technique maintechnique 
     72 { 
     73  pass mainpass 
    7474  { 
    7575   cull_hardware clockwise 
     
    8686} 
    8787 
    88 material GTP/Basic/CameraDepthCCW : GTP/Basic/CameraDepthCCW 
    89 { 
    90  technique 
    91  { 
    92   pass 
    93   { 
    94    cull_hardware anticlockwise 
    95    vertex_program_ref GTP/Basic/CPos_VS 
    96    {   
    97      param_named_auto WorldViewProj worldviewproj_matrix 
    98      param_named_auto WorldView     worldview_matrix      
    99    }  
    100    fragment_program_ref GTP/Basic/CDepth_PS 
    101    {     
    102    }    
     88material GTP/Basic/CameraDepthCCW : GTP/Basic/CameraDepth 
     89{ 
     90 technique maintechnique 
     91 { 
     92  pass mainpass 
     93  { 
     94   cull_hardware anticlockwise    
    10395  } 
    10496 } 
     
    173165  { 
    174166        vertex_program_ref GTP/Basic/LightVPos_VS 
    175         {        
    176             param_named_auto    World           world_matrix 
    177             param_named_auto    WorldViewProj   worldviewproj_matrix 
    178             param_named         LightViewProj   matrix4x4         
    179         }  
     167    {        
     168            param_named_auto    World                   world_matrix 
     169        param_named_auto        WorldViewProj   worldviewproj_matrix 
     170            param_named                 LightViewProj   matrix4x4 1 0 0 0 0 1 0 0 0 0  1 0 0 0 0 1 
     171    }  
    180172        fragment_program_ref  GTP/Basic/LightVPos_PS 
    181         {  
     173    {  
    182174            
    183         } 
     175    } 
    184176  } 
    185177 }               
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic.program

    r2266 r2294  
    144144   source GTPBasic_PS.hlsl 
    145145   entry_point PlainTex2D 
     146   target ps_2_0 
     147} 
     148 
     149fragment_program GTP/Basic/PlainTex2DColored_PS hlsl 
     150{ 
     151   source GTPBasic_PS.hlsl 
     152   entry_point PlainTex2DColored 
    146153   target ps_2_0 
    147154} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic_PS.hlsl

    r2266 r2294  
    3535{ 
    3636 float4 pos = IN.VPosition / IN.VPosition.w; 
    37  return float4(pos.z, pos.z * pos.z, 1, 1);      
     37 return float4(pos.z, 0, 0, 1);  
    3838} 
    3939 
     
    6262 
    6363float4 PlainTex2D(PlainTex_OUT IN, 
    64                 uniform sampler2D Texture) : COLOR 
     64                                  uniform sampler2D Texture) : COLOR 
    6565{ 
    66  return IN.color * tex2D(Texture, IN.texCoord.xy); 
     66 return tex2D(Texture, IN.texCoord.xy); 
     67} 
     68 
     69float4 PlainTex2DColored(PlainTex_OUT IN, 
     70                                        uniform float4 color, 
     71                                  uniform sampler2D Texture) : COLOR 
     72{ 
     73 return color * tex2D(Texture, IN.texCoord.xy); 
    6774} 
    6875 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic_VS.hlsl

    r2181 r2294  
    2424 
    2525PlainTex_OUT PlainTex_VS(float4 position : POSITION, 
    26                    float4 color : COLOR0, 
     26                                   float4 color : COLOR, 
    2727                   float4 texCoord : TEXCOORD0, 
    2828                   uniform float4x4 WorldViewProj) 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowMap_PS.hlsl

    r2271 r2294  
    1414#define DEPTH_BIAS      0.001 
    1515#define DEPTH_BIAS_VSM  0.001 
    16 #define DEPTH_EPSILON   0.0005 
     16#define DEPTH_EPSILON   0.05 
    1717#define DIST_BIAS       0.005 
    1818#define DIST_BIAS_VSM   0.05 
    1919#define DIST_EPSILON    0.01 
    2020 
    21 #define shadowColor float4(0.9,0.9,0.9,1) 
     21//#define shadowColor float4(0.9,0.9,0.9,1) 
     22#define shadowColor float4(0.1,0.1,0.1,1) 
    2223 
    2324float4 shadowMapDepth(LightVPos_OUT IN, 
     
    2627  float4 light = shadowColor;      
    2728         
    28   if(IN.LightVPos.z > 0.0) 
     29 // if(IN.LightVPos.z > 0.0) 
    2930  { 
    3031        float4 pos = (IN.LightVPos / IN.LightVPos.w); 
     
    3233        pos.xy = (pos.xy + 1.0) / 2.0; 
    3334        pos.y = 1.0 - pos.y; 
    34         float4 storedDepth = tex2D(shadowMap, pos.xy); 
    35         light = max(storedDepth.r + DEPTH_BIAS >= pos.z, shadowColor);                   
     35        float storedDepth = abs(tex2D(shadowMap, pos.xy).r); 
     36        //light = (pos.z - storedDepth.r)*100.0; 
     37        light = max(storedDepth + DEPTH_BIAS > pos.z, shadowColor);                      
    3638  }              
    3739  return light;  
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPParticles/GTP_Particles.particle

    r2024 r2294  
    4848    quota           200 
    4949    sorted                      true 
    50     billboard_type  point 
     50    //billboard_type  point 
    5151     
    5252    // Area emitter 
     
    9090    cull_each       false 
    9191    quota           400 
    92     billboard_type  point 
     92    //billboard_type  point 
    9393     
    9494    // Area emitter 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Phong.hlsl

    r1671 r2294  
    110110                uniform float4x4 worldViewProj, 
    111111                uniform float4x4 worldView, 
    112                 uniform float4x4 worldViewIT) 
     112                uniform float4x4 worldViewI) 
    113113{ 
    114114  vertOUT OUT; 
    115115  OUT.hPos = OUT.hPosition = mul(worldViewProj, position); 
    116116  OUT.wPos = mul(worldView, position).xyz;   
    117   OUT.mNormal = mul(worldViewIT, normal).xyz; 
     117  OUT.mNormal = mul(normal, worldViewI).xyz; 
    118118  //OUT.mNormal = normal; 
    119119  OUT.texCoord = texCoord;   
     
    160160           uniform float4 diffuse, 
    161161           uniform float4 ambient, 
    162            uniform sampler2D colorTexture, 
    163            uniform float4x4 worldViewIT           
    164  
    165             ) : COLOR0 
     162           uniform sampler2D colorTexture ) : COLOR0 
    166163{ 
    167164    
Note: See TracChangeset for help on using the changeset viewer.