Ignore:
Timestamp:
05/12/07 14:22:06 (18 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media/materials
Files:
3 edited

Legend:

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

    r2357 r2368  
    1 #include ".\\dummy.hlsl" 
    2  
    31struct Shaded_OUT 
    42{ 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPCaustic/GTPCaustic.material

    r2337 r2368  
    128128         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS 
    129129         {  
    130                     param_named_auto cameraPos camera_position 
     130            param_named_auto cameraPos camera_position 
    131131            param_named lastCenter float3 0 0 0 
    132132            param_named sFresnel float 0.1 
    133 <<<<<<< .mine 
    134133            param_named sRefraction float 0.85 
    135 ======= 
    136             param_named sRefraction float 0.8 
    137 >>>>>>> .r2314 
     134 
    138135             }           
    139136             //Cube map for reflections and refractions  
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Blur.hlsl

    r2138 r2368  
    1 #define samplesU 7 
    2 #define samplesV 7 
     1#define samplesU 3 
     2#define samplesV 3 
    33 
    44struct VS_INPUT {            
     
    6767                        uniform float height, 
    6868                        uniform float face ) : COLOR 
    69 {   
    70  
     69{ 
     70/* 
    7171  float2 pixel = float2(2.0 / width, 2.0 / height); 
    7272  float2 uv = IN.Position + pixel * 0.5; 
     
    8989         } 
    9090                 
    91  
    92   sum /= samplesU * samplesV; 
     91*/ 
     92  float pixel = 2.0 / width; 
     93  float2 uv = IN.Position; 
     94  float3 u; 
     95  float3 v; 
     96  float3 pos; 
     97  if (face == 0){u = float3(0,0,-1); v = float3(0,1,0); pos = float3(1,uv.y,-uv.x);} 
     98  if (face == 1){u = float3(0,0,1); v = float3(0,1,0); pos = float3(-1,uv.y,uv.x);} 
     99  if (face == 2){u = float3(1,0,0); v = float3(0,0,-1); pos = float3(uv.x,1,-uv.y);} 
     100  if (face == 3){u = float3(1,0,0); v = float3(0,0,1); pos = float3(uv.x,-1,uv.y);} 
     101  if (face == 4){u = float3(1,0,0); v = float3(0,1,0); pos = float3(uv.x,uv.y,1);} 
     102  if (face == 5){u = float3(-1,0,0); v = float3(0,1,0); pos = float3(-uv.x,uv.y,-1);} 
     103  u *= pixel; 
     104  v *= pixel; 
     105  float4 sum = float4(0,0,0,0); 
     106  sum += texCUBE(Texture, pos); 
     107  sum += texCUBE(Texture, pos + u); 
     108  sum += texCUBE(Texture, pos + v); 
     109  sum += texCUBE(Texture, pos + u + v); 
     110  sum /= 4.0; 
    93111 
    94112  return sum; 
Note: See TracChangeset for help on using the changeset viewer.