Changeset 2345


Ignore:
Timestamp:
05/03/07 11:31:38 (17 years ago)
Author:
szirmay
Message:
 
Location:
GTP/trunk/App/Demos/Illum/Ogre/Media
Files:
4 edited

Legend:

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

    r2336 r2345  
    3535        Light = normalize(Light); 
    3636        float3 Half = normalize(Light + View); 
    37         float4 Lighting = lit(dot(Normal, Light), dot(Normal, Half), 16); 
     37        float4 Lighting = lit(dot(Normal, Light), dot(Normal, Half), 120); 
    3838        float4 Color= tex2D(ColorMapSampler, tileTexCoord) * tex2D(DetailMapSampler, detailTexCoord2); 
    3939 
    40         return Lighting.y * Color * (d < lightRange.x) / (lightRange.y + d * lightRange.z + d * d * lightRange.w) * lightPower; 
     40        return (Lighting.y * Color + Lighting.z * 0.5) * (d < lightRange.x) / (lightRange.y + d * lightRange.z + d * d * lightRange.w) * lightPower; 
    4141} 
    4242 
     
    116116        float3x3 ModelToTangent = TransfModelToTangent(IN.wTangent, IN.wBinormal, IN.wNormal ); 
    117117    // get model space normal vector 
    118     //float3 tNormal = tex2D(BumpMapSampler, IN.TexNormalCoord).rgb; 
    119     float3 tNormal = float3(0,1,0); 
     118    float3 tNormal = tex2D(BumpMapSampler, IN.TexNormalCoord).rgb; 
     119    if(length(tNormal == 0)) 
     120     tNormal = float3(0,0,1); 
     121    tNormal.xy = (tNormal.xy *2.0) - 1.0; 
    120122        // Normal vector should be transformed with the inverse transpose of TangentToModel 
    121123        // which is the transpose of ModelToTangent 
     
    130132     } 
    131133        // illumination calculation 
    132     return Illumination(mLight, IN.wNormal, mView, IN.TexCoord2, IN.TexCoord) * spotFalloff;     
     134        float4 illum = Illumination(mLight, mNormal/*IN.wNormal*/, mView, IN.TexCoord2, IN.TexCoord) * spotFalloff; 
     135        return float4(illum.rgb, 0.7);   
    133136     
    134137} 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material

    r2338 r2345  
    3636                                        world_param_name World           
    3737                                } 
    38                                 RenderTechnique PathMap 
     38                                RenderTechnique PathMap 
    3939                                { 
    40                             //pass_blending dest_colour one 
    41                              pass_blending none 
     40                              pass_blending dest_alpha one 
     41                             //pass_blending none 
    4242                             //pass_blending add 
    43                                 } 
     43                                }                                
    4444                                 
    4545                        } 
     
    8282                                texture greatpillardetail.png 
    8383                        } 
     84                        texture_unit displace 
     85                        { 
     86                                texture greatpillardisplace.dds 
     87                        } 
    8488                } 
    8589        } 
     
    108112                        { 
    109113                                texture greathallfloordetail.png 
     114                        } 
     115                        texture_unit displace 
     116                        { 
     117                                texture floornormal.jpg 
    110118                        } 
    111119                } 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPathMap/PathMap.hlsl

    r2339 r2345  
    5555        float3 color = tex2D(colorSampler, input.tex).rgb; 
    5656 
    57 return float4(col,1); 
     57//return float4(col,1); 
    5858        return float4(col * color, 1); 
    5959 
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.program

    r2293 r2345  
    4747        target ps_2_0 
    4848}  
    49  
    50 vertex_program GameTools/CubeMap/VertexPrograms/ReduceVS hlsl 
    51 { 
    52         source GameTools_ReduceCubeMap.hlsl 
    53         entry_point ReduceTextureVS 
    54         target vs_3_0 
    55 }  
Note: See TracChangeset for help on using the changeset viewer.