Changeset 2550 for GTP/trunk/App/Demos/Illum/Ogre/Media/Towers
- Timestamp:
- 09/05/07 10:54:23 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/Towers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/Towers/parallax.hlsl
r2441 r2550 14 14 float det = B2 * T2 - BT * BT; 15 15 16 return float3x3( (B2 * Tangent - BT * Binormal)/det,17 (T2 * Binormal - BT * Tangent)/det,18 Normal/N2 );16 //return float3x3( (B2 * Tangent - BT * Binormal)/det, 17 // (T2 * Binormal - BT * Tangent)/det, 18 // Normal/N2 ); 19 19 20 20 // simplified solution 21 21 //return float3x3(Tangent/T2, Binormal/B2, Normal/N2); 22 22 // more simplified solution 23 //return float3x3(Tangent, Binormal, Normal);23 return float3x3(Tangent, Binormal, Normal); 24 24 } 25 25 … … 89 89 90 90 // performing parallax mapping 91 float2 ParallaxTex = PARALLAX_MAPPING_ ITER(BumpMapSampler, IN.TexCoord, tView);91 float2 ParallaxTex = PARALLAX_MAPPING_OFFSET_LIMIT(BumpMapSampler, IN.TexCoord, tView); 92 92 DISCARD_BY_TEX(ParallaxTex); 93 93 94 94 // get model space normal vector 95 //ParallaxTex = IN.TexCoord; 95 96 float3 tNormal = tex2D(BumpMapSampler, ParallaxTex).rgb; 96 97 // Normal vector should be transformed with the inverse transpose of TangentToModel … … 98 99 float3 mNormal = normalize( mul( tNormal, ModelToTangent ) ); 99 100 //mNormal = normalize(IN.wNormal); 101 100 102 // illumination calculation 103 101 104 return Illumination(mLight, mNormal, mView, ParallaxTex, IN.TexCoord2); 102 105 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/Towers/towers.material
r2507 r2550 37 37 fragment_program_ref GTP/Demo/ParallaxMapped_PS 38 38 { 39 param_named HEIGHT_SCALE float 0. 1639 param_named HEIGHT_SCALE float 0.20 40 40 param_named HEIGHT_BIAS float -0.04 41 param_named textureRepeat float 641 param_named textureRepeat float 10 42 42 } 43 43 texture_unit color … … 173 173 { 174 174 max_light_count 1 175 vertex_program_name GTP/Basic/Light VPos_VS176 fragment_program_name GTP/Basic/SM/ Depth_VSM_PS175 vertex_program_name GTP/Basic/LightCPos_VS 176 fragment_program_name GTP/Basic/SM/CameraDepth_PS 177 177 set_light_viewproj true 178 set_light_view false178 set_light_view true 179 179 set_light_farplane false 180 180 world_view_proj_param_name WorldViewProj 181 181 world_param_name World 182 182 light_viewproj_param_name LightViewProj 183 light_view_param_name LightView 184 pass_blending one zero 183 185 } 184 186
Note: See TracChangeset
for help on using the changeset viewer.