Changeset 2458 for GTP/trunk/App/Demos
- Timestamp:
- 06/24/07 10:58:31 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media
- Files:
-
- 20 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSArm_PS.hlsl
r2417 r2458 10 10 uniform sampler2D bumpMap : register(s1); 11 11 12 uniform float4 lightRange; 13 uniform float lightPower; 14 uniform float4 lightColor; 12 uniform float4 lightRange1; 13 uniform float lightPower1; 14 uniform float4 lightColor1; 15 16 uniform float4 lightRange2; 17 uniform float lightPower2; 18 uniform float4 lightColor2; 15 19 16 20 uniform float specularity; … … 27 31 float3 normal:TEXCOORD3; 28 32 float3 V: TEXCOORD4; 29 float3 L: TEXCOORD5; 33 float3 L1: TEXCOORD5; 34 float3 L2: TEXCOORD6; 30 35 }; 31 36 … … 36 41 float dist = length(IN.V); 37 42 float3 V = IN.V /dist; 38 float3 L = IN.L; 43 float3 L1 = IN.L1; 44 float3 L2 = IN.L2; 39 45 40 46 float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 41 47 42 Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 48 if(lightPower1 !=0) 49 Color = Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 50 51 if(lightPower2 !=0) 52 Color = Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 43 53 44 54 float4 ret = Color; -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSarm.material
r2422 r2458 19 19 source FPSArm_PS.hlsl 20 20 entry_point FPSArm_PS 21 target ps_ 2_021 target ps_3_0 22 22 } 23 23 … … 81 81 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 82 82 param_named_auto viewProjectionMatrix viewproj_matrix 83 param_named_auto lightPos light_position 0 83 param_named_auto lightPos1 light_position 0 84 param_named_auto lightPos2 light_position 1 84 85 param_named_auto cameraPos camera_position 85 86 } 86 87 fragment_program_ref FPSArm_PS 87 88 { 88 param_named_auto lightRange light_attenuation 0 89 param_named_auto lightPower light_power 0 90 param_named_auto lightColor light_diffuse_colour 0 89 param_named_auto lightRange1 light_attenuation 0 90 param_named_auto lightPower1 light_power 0 91 param_named_auto lightColor1 light_diffuse_colour 0 92 param_named_auto lightRange2 light_attenuation 1 93 param_named_auto lightPower2 light_power 1 94 param_named_auto lightColor2 light_diffuse_colour 1 91 95 param_named specularity float 100 92 96 param_named albedo float 0.1 -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/GTPMoriaPostProc.material
r2442 r2458 81 81 param_named focalDist float 2.0 82 82 param_named focalRange float 0.02 83 param_named maxCoC float 1 583 param_named maxCoC float 10 84 84 85 85 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl
r2442 r2458 28 28 uniform float lightPower2; 29 29 uniform float4 lightColor1; 30 uniform float4 lightColor2;30 float4 lightColor2 = 0; 31 31 32 32 uniform float4x4 LightView1; … … 100 100 float shadow; 101 101 102 //if(dot(lightColor1, lightColor1) != 0)103 //{102 if( dot(lightRange1, lightRange1) != 0) 103 { 104 104 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 105 105 //illumination … … 112 112 113 113 //Color = col; 114 //}114 } 115 115 116 116 //---------------------------------------------------------------------------------------------------------------- 117 117 //light2 118 /*if(dot(lightColor2, lightColor2) != 0)118 if( dot(lightRange2, lightRange2) != 0 ) 119 119 { 120 120 //light dir … … 126 126 shadow = shadowPoint(ShadowMap2Point, lightCPos, lightFarPlane2); 127 127 Color += col * shadow; 128 } */128 } 129 129 130 130 //do Path Map to gather indirect illumination -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/SkinningVS.cg
r2422 r2458 13 13 out float3 oNormal : TEXCOORD3, 14 14 out float3 V: TEXCOORD4, 15 out float3 L: TEXCOORD5, 15 out float3 L1: TEXCOORD5, 16 out float3 L2: TEXCOORD6, 16 17 uniform float3x4 worldMatrix3x4Array[69], 17 18 uniform float4x4 viewProjectionMatrix, 18 uniform float4 lightPos, 19 uniform float4 lightPos1, 20 uniform float4 lightPos2, 19 21 uniform float4 cameraPos) 20 22 { … … 34 36 // oBinormal = cross(oTangent, oNormal); 35 37 // Lighting - support point and directional 36 L = lightPos.xyz - blendPos.xyz * lightPos.w; 38 L1 = lightPos1.xyz - blendPos.xyz * lightPos1.w; 39 L2 = lightPos2.xyz - blendPos.xyz * lightPos2.w; 37 40 V = cameraPos.xyz - blendPos.xyz; 38 41 … … 69 72 float3 normal:TEXCOORD3; 70 73 float3 V: TEXCOORD4; 71 float3 L: TEXCOORD5; 74 float3 L1: TEXCOORD5; 75 float3 L2: TEXCOORD6; 72 76 }; 73 77 … … 81 85 uniform float4x4 viewMatrix, 82 86 uniform float4x4 viewProjectionMatrix, 83 uniform float4 lightPos, 87 uniform float4 lightPos1, 88 uniform float4 lightPos2, 84 89 uniform float4 cameraPos) 85 90 { … … 101 106 OUT.binormal = cross(OUT.tangent, OUT.normal); 102 107 // Lighting - support point and directional 103 OUT.L = lightPos.xyz - blendPos.xyz * lightPos.w; 108 OUT.L1 = lightPos1.xyz - blendPos.xyz * lightPos1.w; 109 OUT.L2 = lightPos2.xyz - blendPos.xyz * lightPos2.w; 104 110 OUT.V = cameraPos.xyz - blendPos.xyz; 105 111 -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl
r2442 r2458 1 1 #define SPOT_ANGLE 2.093 2 2 #define SPOT_FALLOFF 1 3 #define SHADOW_COLOR float4(0. 0,0.0,0.0,1.0)4 #define SHADOW_BIAS_POINT 0.00 015 #define SHADOW_EPSILON_POINT 0.000 13 #define SHADOW_COLOR float4(0.2,0.2,0.2,1.0) 4 #define SHADOW_BIAS_POINT 0.001 5 #define SHADOW_EPSILON_POINT 0.0000005 6 6 7 7 float4 Illumination(float3 N, float3 L, float3 V, float4 lightColor, float4 lightRange, float4 diffuseColor, float specularity, float4 specularColor) -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.level
r2389 r2458 88 88 pathmapresolution 16 89 89 divide 1 90 physXShape cube 2 10 290 physXShape cube 3 12 3 91 91 physXStatic true 92 //physXMass 10000 93 //physXKinematic true 92 94 } 93 95 mesh MoriaWallShape -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material
r2442 r2458 24 24 //{ 25 25 //pass_blending one one 26 26 // new_passes false 27 27 // start_tex_id 3 28 28 //} … … 33 33 RenderTechnique DepthShadowReceiver 34 34 { 35 max_light_count 135 max_light_count 2 36 36 set_light_viewproj false 37 37 set_light_view true … … 272 272 } 273 273 274 material GTP/Moria/Crosshair 275 { 276 technique 277 { 278 pass 279 { 280 scene_blend one one_minus_src_colour 281 cull_hardware none 282 depth_test off 283 depth_write off 284 lighting off 285 texture_unit 286 { 287 texture crosshair.jpg 288 colour_op replace 289 } 290 } 291 } 292 } 293 294 material GTP/Moria/Border 295 { 296 technique 297 { 298 pass 299 { 300 scene_blend one one_minus_src_colour 301 cull_hardware none 302 depth_test off 303 depth_write off 304 lighting off 305 texture_unit 306 { 307 texture border.jpg 308 colour_op replace 309 } 310 } 311 } 312 } 313 314 material GTP/Moria/HUD/Column 315 { 316 technique t1 317 { 318 pass p1 319 { 320 // scene_blend one one_minus_src_colour 321 cull_hardware none 322 depth_test off 323 depth_write off 324 lighting off 325 326 } 327 } 328 } 329 330 material GTP/Moria/HUD/BlueColumn : GTP/Moria/HUD/Column 331 { 332 technique t1 333 { 334 pass p1 335 { 336 texture_unit 337 { 338 texture blue.jpg 339 colour_op replace 340 } 341 } 342 } 343 } 344 345 material GTP/Moria/HUD/RedColumn : GTP/Moria/HUD/Column 346 { 347 technique t1 348 { 349 pass p1 350 { 351 texture_unit 352 { 353 texture red.jpg 354 colour_op replace 355 } 356 } 357 } 358 } 359 360 material GTP/Moria/HUD/YellowColumn : GTP/Moria/HUD/Column 361 { 362 technique t1 363 { 364 pass p1 365 { 366 texture_unit 367 { 368 texture yellow.jpg 369 colour_op replace 370 tex_address_mode clamp 371 } 372 } 373 } 374 } 375 376 material GTP/Moria/HUD/SwordIcon : GTP/Moria/HUD/Column 377 { 378 technique t1 379 { 380 pass p1 381 { 382 texture_unit 383 { 384 texture swordicon.jpg 385 colour_op replace 386 tex_address_mode clamp 387 } 388 } 389 } 390 } 391 392 material GTP/Moria/HUD/FireBallIcon : GTP/Moria/HUD/Column 393 { 394 technique t1 395 { 396 pass p1 397 { 398 texture_unit 399 { 400 texture fireballicon.jpg 401 colour_op replace 402 tex_address_mode clamp 403 } 404 } 405 } 406 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/troll.material
r2417 r2458 19 19 source trollps.hlsl 20 20 entry_point Troll_PS 21 target ps_ 2_021 target ps_3_0 22 22 } 23 23 … … 81 81 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 82 82 param_named_auto viewProjectionMatrix viewproj_matrix 83 param_named_auto lightPos light_position 0 83 param_named_auto lightPos1 light_position 0 84 param_named_auto lightPos2 light_position 1 84 85 param_named_auto cameraPos camera_position 85 86 } 86 87 fragment_program_ref TrollPS 87 88 { 88 param_named_auto lightRange light_attenuation 0 89 param_named_auto lightPower light_power 0 90 param_named_auto lightColor light_diffuse_colour 0 89 param_named_auto lightRange1 light_attenuation 0 90 param_named_auto lightPower1 light_power 0 91 param_named_auto lightColor1 light_diffuse_colour 0 92 param_named_auto lightRange2 light_attenuation 1 93 param_named_auto lightPower2 light_power 1 94 param_named_auto lightColor2 light_diffuse_colour 1 91 95 param_named specularity float 200 92 96 param_named albedo float 0.1 … … 150 154 } 151 155 156 vertex_program GTP/Troll/Mace_VS hlsl 157 { 158 source sword.hlsl 159 entry_point Sword_VS 160 target vs_2_0 161 } 162 fragment_program GTP/Troll/Mace_PS hlsl 163 { 164 source sword.hlsl 165 entry_point Sword_Handle_PS 166 target ps_3_0 167 } 168 169 material TrollMace 170 { 171 technique 172 { 173 pass 174 { 175 vertex_program_ref GTP/Troll/Mace_VS 176 { 177 param_named_auto WorldViewProj worldviewproj_matrix 178 param_named_auto World world_matrix 179 param_named_auto WorldI inverse_world_matrix 180 param_named_auto wCamPos camera_position 181 } 182 fragment_program_ref GTP/Troll/Mace_PS 183 { 184 param_named_auto wLightPos1 light_position 0 185 // param_named_auto wLightPos2 light_position 1 186 param_named_auto lightRange1 light_attenuation 0 187 // param_named_auto lightRange2 light_attenuation 1 188 param_named_auto lightPower1 light_power 0 189 // param_named_auto lightPower2 light_power 1 190 param_named_auto lightColor1 light_diffuse_colour 0 191 // param_named_auto lightColor2 light_diffuse_colour 1 192 param_named specularity float 100 193 param_named specularColor float4 0.05 0.05 0.05 0.05 194 } 195 texture_unit 196 { 197 texture trollmace.jpg 198 } 199 } 200 } 201 } 202 203 -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/trollps.hlsl
r2417 r2458 10 10 uniform sampler2D bumpMap : register(s1); 11 11 12 uniform float4 lightRange; 13 uniform float lightPower; 14 uniform float4 lightColor; 12 uniform float4 lightRange1; 13 uniform float lightPower1; 14 uniform float4 lightColor1; 15 16 uniform float4 lightRange2; 17 uniform float lightPower2; 18 uniform float4 lightColor2; 15 19 16 20 uniform float specularity; … … 27 31 float3 normal:TEXCOORD3; 28 32 float3 V: TEXCOORD4; 29 float3 L: TEXCOORD5; 33 float3 L1: TEXCOORD5; 34 float3 L2: TEXCOORD6; 30 35 }; 31 36 … … 36 41 float dist = length(IN.V); 37 42 float3 V = IN.V /dist; 38 float3 L = IN.L; 43 float3 L1 = IN.L1; 44 float3 L2 = IN.L2; 39 45 40 46 float4 diffuseColor = albedo * tex2D(colorTexture, IN.texCoord); 41 42 Color = Illumination(N, L, V, lightColor * lightPower, lightRange, diffuseColor, specularity, specularColor); 47 if(lightPower1 != 0) 48 Color += Illumination(N, L1, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 49 if(lightPower2 != 0) 50 Color += Illumination(N, L2, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 43 51 44 52 float4 ret = Color; -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.material
r2414 r2458 57 57 param_named_auto width viewport_width 58 58 param_named_auto height viewport_height 59 param_named_auto alpha frame_time 9.059 param_named_auto alpha frame_time 1.0 60 60 61 61 }
Note: See TracChangeset
for help on using the changeset viewer.