Changeset 2345
- Timestamp:
- 05/03/07 11:31:38 (18 years ago)
- 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 35 35 Light = normalize(Light); 36 36 float3 Half = normalize(Light + View); 37 float4 Lighting = lit(dot(Normal, Light), dot(Normal, Half), 1 6);37 float4 Lighting = lit(dot(Normal, Light), dot(Normal, Half), 120); 38 38 float4 Color= tex2D(ColorMapSampler, tileTexCoord) * tex2D(DetailMapSampler, detailTexCoord2); 39 39 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; 41 41 } 42 42 … … 116 116 float3x3 ModelToTangent = TransfModelToTangent(IN.wTangent, IN.wBinormal, IN.wNormal ); 117 117 // 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; 120 122 // Normal vector should be transformed with the inverse transpose of TangentToModel 121 123 // which is the transpose of ModelToTangent … … 130 132 } 131 133 // 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); 133 136 134 137 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material
r2338 r2345 36 36 world_param_name World 37 37 } 38 38 RenderTechnique PathMap 39 39 { 40 //pass_blending dest_colourone41 pass_blending none40 pass_blending dest_alpha one 41 //pass_blending none 42 42 //pass_blending add 43 } 43 } 44 44 45 45 } … … 82 82 texture greatpillardetail.png 83 83 } 84 texture_unit displace 85 { 86 texture greatpillardisplace.dds 87 } 84 88 } 85 89 } … … 108 112 { 109 113 texture greathallfloordetail.png 114 } 115 texture_unit displace 116 { 117 texture floornormal.jpg 110 118 } 111 119 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPathMap/PathMap.hlsl
r2339 r2345 55 55 float3 color = tex2D(colorSampler, input.tex).rgb; 56 56 57 return float4(col,1);57 //return float4(col,1); 58 58 return float4(col * color, 1); 59 59 -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.program
r2293 r2345 47 47 target ps_2_0 48 48 } 49 50 vertex_program GameTools/CubeMap/VertexPrograms/ReduceVS hlsl51 {52 source GameTools_ReduceCubeMap.hlsl53 entry_point ReduceTextureVS54 target vs_3_055 }
Note: See TracChangeset
for help on using the changeset viewer.