Changeset 2398 for GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA
- Timestamp:
- 05/28/07 17:00:18 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA
- Files:
-
- 9 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSarm.material
r2392 r2398 10 10 emissive 0 0 0 11 11 12 scene_blend alpha_blend12 //scene_blend alpha_blend 13 13 depth_write on 14 14 //depth_check off -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaDust.material
r2392 r2398 30 30 depth_write off 31 31 scene_blend src_alpha one 32 scene_blend_alpha zero one 32 33 //scene_blend alpha_blend 33 34 vertex_program_ref Moria/MoriaDust_VS -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl
r2386 r2398 92 92 float4 Color = 0; 93 93 float3 N = NormalMap(IN.wTangent, IN.wBinormal, IN.wNormal, IN.texCoord2.xy, bumpMap); 94 float3 V = normalize(IN.wView); 94 float dist = length(IN.wView); 95 float3 V = IN.wView / dist; 95 96 // read textures 96 97 float4 diffuseColor = tex2D(tileTexture, IN.texCoord.zw) * tex2D(detailTexture, IN.texCoord.xy); … … 104 105 float shadow; 105 106 106 if(dot(lightColor1, lightColor1) != 0)107 {107 //if(dot(lightColor1, lightColor1) != 0) 108 //{ 108 109 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 109 110 //illumination … … 113 114 shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 114 115 Color += col * shadow; 115 } 116 117 //Color = col; 118 //} 116 119 117 120 //---------------------------------------------------------------------------------------------------------------- … … 137 140 //gather caustics for all casters 138 141 //return diffuseColor; 142 Color.a = dist; 139 143 return Color; 140 144 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl
r2376 r2398 7 7 float3 H = normalize(L + V); 8 8 float4 Lighting = lit(dot(N, L), dot(N, H), specularity); 9 Lighting = saturate(Lighting); 9 10 10 11 return lightColor * (Lighting.y * diffuseColor + Lighting.z * specularColor) //color 11 12 / (lightRange.y + d * lightRange.z + d * d * lightRange.w) //attenuation 12 13 ; 14 15 //return lightColor * (Lighting.y * diffuseColor); 13 16 } 14 17 … … 19 22 float3 mNormal; 20 23 float3 tNormal = tex2D(normalMap, texCoord).rgb; 21 if(length(tNormal == 0)) 22 mNormal = normal; 23 else 24 { 25 tangent = normalize(tangent); 26 binormal = normalize(binormal); 27 float3x3 TangentToModel = float3x3(tangent, binormal, normal ); 24 //tNormal = float3(0.5,0.5,1.0); 25 26 tangent = normalize(tangent); 27 binormal = normalize(binormal); 28 float3x3 TangentToModel = float3x3(tangent, binormal, normal ); 28 29 29 30 31 }30 tNormal.xy = (tNormal.xy *2.0) - 1.0; 31 mNormal = normalize( mul( tNormal, TangentToModel ) ); 32 32 33 return mNormal; 33 34 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material
r2386 r2398 26 26 // start_tex_id 3 27 27 //} 28 //RenderTechnique SphericalBillboard 29 //{ 30 // bind_texture false 31 //} 28 32 RenderTechnique DepthShadowReceiver 29 33 { … … 68 72 texture_unit displace 69 73 { 74 texture nullbump.bmp 75 //filtering none 76 //tex_address_mode clamp 70 77 } 71 78 texture_unit pathMap … … 104 111 texture_unit displace 105 112 { 106 texture greatpillardisplace.dds 113 texture greatpillarbump.bmp 114 //texture nullbump.bmp 115 //tex_address_mode mirror 107 116 } 108 117 } … … 150 159 texture greatHallWallDetail.png 151 160 } 161 texture_unit displace 162 { 163 texture morialwalldetailbump.bmp 164 } 152 165 } 153 166 } … … 167 180 texture pillarheaddetail.png 168 181 } 182 texture_unit displace 183 { 184 texture greatpillarheadbump.bmp 185 } 186 169 187 } 170 188 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl
r2389 r2398 33 33 float4 Color = 0; 34 34 float3 N = normalize(IN.normal);//NormalMap(IN.tangent, IN.binormal, IN.normal, IN.texCoord, bumpMap); 35 float3 V = normalize(IN.V); 35 float dist = length(IN.V); 36 float3 V = IN.V /dist; 36 37 float3 L = IN.L; 37 38 … … 40 41 Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 41 42 42 return diffuseColor * 0.1 + Color; 43 float4 ret = diffuseColor * 0.1 + Color; 44 return float4(ret.xyz, dist); 43 45 }
Note: See TracChangeset
for help on using the changeset viewer.