Ignore:
Timestamp:
03/02/07 19:07:56 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
71 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/Demo/bump.hlsl

    r2157 r2186  
    109109    return Illumination(mLight, mNormal, mView, IN.TexCoord, IN.TexCoord2); 
    110110     
     111     
    111112} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/Demo/parallax.hlsl

    r2152 r2186  
    1717                         (T2 * Binormal - BT * Tangent)/det,  
    1818                         Normal/N2 ); 
    19 /*                                                       
     19                                                         
    2020        // simplified solution 
    21         return float3x3(Tangent/T2, Binormal/B2, Normal/N2);  
    22 */ 
     21        //return float3x3(Tangent/T2, Binormal/B2, Normal/N2);  
     22        // more simplified solution 
     23        //return float3x3(Tangent, Binormal, Normal); 
    2324} 
    2425 
     
    5253} 
    5354 
    54 float2 PARALLAX_MAPPING_ITER(sampler2D heightMap, float3 TexCoord, float3 View) 
     55float2 PARALLAX_MAPPING_OFFSET_LIMIT(sampler2D heightMap, float2 TexCoord, float3 View) 
     56{ 
     57    float4 Normal = tex2D(heightMap, TexCoord); 
     58    float h = Normal.a * HEIGHT_SCALE + HEIGHT_BIAS; 
     59    return TexCoord + h * View.xy; 
     60} 
     61 
     62float2 PARALLAX_MAPPING_ITER(sampler2D heightMap, float2 TexCoord, float3 View) 
    5563{ 
    5664    for(int i = 0; i < PARALLAX_ITERATION; i++) { 
    5765                float4 Normal = tex2D(heightMap, TexCoord); 
    5866                float h = Normal.a * HEIGHT_SCALE + HEIGHT_BIAS; 
    59                 TexCoord += (h - TexCoord.z) * Normal.z * View; 
     67                TexCoord += h * Normal.z * View; 
    6068        } 
    6169        return TexCoord.xy; 
     
    8189      
    8290    // performing parallax mapping 
    83     float2 ParallaxTex = PARALLAX_MAPPING_ITER(BumpMapSampler, float3(IN.TexCoord, 0), tView); 
     91    float2 ParallaxTex = PARALLAX_MAPPING_ITER(BumpMapSampler, IN.TexCoord, tView); 
    8492        DISCARD_BY_TEX(ParallaxTex); 
    8593         
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowMap_PS.hlsl

    r2181 r2186  
    1919#define DIST_EPSILON    0.001 
    2020 
    21 #define shadowColor float4(0.85,0.85,0.85,1) 
     21#define shadowColor float4(0.2,0.2,0.2,1) 
    2222 
    2323float4 shadowMapDepth(LightVPos_OUT IN, 
Note: See TracChangeset for help on using the changeset viewer.