Changeset 2404 for GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA
- Timestamp:
- 06/05/07 01:57:13 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/FPSarm.material
r2398 r2404 24 24 } 25 25 } 26 27 vertex_program GTP/MoriaDemo/Sword_VS hlsl 28 { 29 source sword.hlsl 30 entry_point Sword_VS 31 target vs_2_0 32 } 33 34 fragment_program GTP/MoriaDemo/Sword_Metal_PS hlsl 35 { 36 source sword.hlsl 37 entry_point Sword_Metal_PS 38 target ps_3_0 39 } 40 fragment_program GTP/MoriaDemo/Sword_Handle_PS hlsl 41 { 42 source sword.hlsl 43 entry_point Sword_Handle_PS 44 target ps_3_0 45 } 46 47 material swordHandle 48 { 49 technique 50 { 51 pass 52 { 53 IllumTechniques 54 { 55 // RenderTechnique DepthShadowReceiver 56 // { 57 // max_light_count 1 58 // set_light_viewproj false 59 // set_light_view true 60 // set_light_farplane true 61 // light_view_param_name LightView 62 // light_farplane_param_name lightFarPlane 63 // new_passes false 64 // start_tex_id 1 65 // } 66 } 67 cull_hardware none 68 vertex_program_ref GTP/MoriaDemo/Sword_VS 69 { 70 param_named_auto WorldViewProj worldviewproj_matrix 71 param_named_auto World world_matrix 72 param_named_auto WorldI inverse_world_matrix 73 param_named_auto wCamPos camera_position 74 } 75 fragment_program_ref GTP/MoriaDemo/Sword_Handle_PS 76 { 77 param_named_auto wLightPos1 light_position 0 78 // param_named_auto wLightPos2 light_position 1 79 param_named_auto lightRange1 light_attenuation 0 80 // param_named_auto lightRange2 light_attenuation 1 81 param_named_auto lightPower1 light_power 0 82 // param_named_auto lightPower2 light_power 1 83 param_named_auto lightColor1 light_diffuse_colour 0 84 // param_named_auto lightColor2 light_diffuse_colour 1 85 param_named specularity float 100 86 param_named specularColor float4 0.05 0.05 0.05 0.05 87 } 88 texture_unit 89 { 90 texture swordColor.dds 91 } 92 texture_unit 93 { 94 } 95 texture_unit 96 { 97 } 98 } 99 } 100 } 101 102 material swordMetal 103 { 104 technique maintechnique 105 { 106 pass mainpass 107 { 108 IllumTechniques 109 { 110 RenderTechnique ColorCubeMap 111 { 112 update_interval 1 113 update_all_face false 114 distance_calc false 115 face_angle_calc false 116 } 117 } 118 vertex_program_ref GTP/Basic/ShadedTex_VS 119 { 120 param_named_auto WorldViewProj worldviewproj_matrix 121 param_named_auto World world_matrix 122 param_named_auto WorldInv inverse_world_matrix 123 } 124 fragment_program_ref GTP/MoriaDemo/Sword_Metal_PS 125 { 126 param_named_auto wCamPos camera_position 127 } 128 //Cube map for reflections and refractions 129 texture_unit 130 { 131 132 } 133 texture_unit 134 { 135 texture swordColor.dds 136 } 137 } 138 } 139 } 140 141 -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl
r2398 r2404 3 3 #define MAX_LIGHT 2 4 4 #define MAX_CAU_CASTER 2 5 #define SPOT_ANGLE 2.0936 #define SPOT_FALLOFF 17 #define SHADOW_COLOR float4(0.3,0.3,0.3,1.0)8 #define SHADOW_BIAS_POINT 0.00019 #define SHADOW_EPSILON_POINT 0.000110 5 11 6 #include "illum.hlsl" -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl
r2398 r2404 1 #define SPOT_ANGLE 2.093 2 #define SPOT_FALLOFF 1 3 #define SHADOW_COLOR float4(0.3,0.3,0.3,1.0) 4 #define SHADOW_BIAS_POINT 0.0001 5 #define SHADOW_EPSILON_POINT 0.0001 1 6 2 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/trollvs.cg
r2386 r2404 5 5 float2 uv : TEXCOORD0, 6 6 float3 tangent : TANGENT, 7 float blendIdx : BLENDINDICES, 7 float4 blendIdx : BLENDINDICES, 8 float4 blendWgt : BLENDWEIGHT, 8 9 out float4 oPosition : POSITION, 9 10 out float2 oUv : TEXCOORD0, 10 out float3 oTangent: TEXCOORD1,11 out float3 oBinormal: TEXCOORD2,11 //out float3 oTangent: TEXCOORD1, 12 //out float3 oBinormal: TEXCOORD2, 12 13 out float3 oNormal : TEXCOORD3, 13 14 out float3 V: TEXCOORD4, 14 15 out float3 L: TEXCOORD5, 15 uniform float3x4 worldMatrix3x4Array[6 7],16 uniform float3x4 worldMatrix3x4Array[69], 16 17 uniform float4x4 viewProjectionMatrix, 17 18 uniform float4 lightPos, … … 19 20 { 20 21 // transform by indexed matrix 21 float4 blendPos = float4(mul(worldMatrix3x4Array[blendIdx], position).xyz, 1.0); 22 float4 blendPos = float4(0,0,0,1); 23 blendPos.xyz += mul(worldMatrix3x4Array[blendIdx[0]], position).xyz * blendWgt[0]; 24 blendPos.xyz += mul(worldMatrix3x4Array[blendIdx[1]], position).xyz * blendWgt[1]; 25 22 26 // view / projection 23 27 oPosition = mul(viewProjectionMatrix, blendPos); 24 28 // transform normal 25 oNormal = mul((float3x3)worldMatrix3x4Array[blendIdx], normal);26 oTangent = mul((float3x3)worldMatrix3x4Array[blendIdx], tangent);29 //oNormal = mul((float3x3)worldMatrix3x4Array[blendIdx], normal); 30 //oTangent = mul((float3x3)worldMatrix3x4Array[blendIdx], tangent); 27 31 oNormal = normalize(oNormal); 28 oTangent = normalize(oTangent);29 oBinormal = cross(oTangent, oNormal);32 // oTangent = normalize(oTangent); 33 // oBinormal = cross(oTangent, oNormal); 30 34 // Lighting - support point and directional 31 35 L = lightPos.xyz - blendPos.xyz * lightPos.w; … … 38 42 void trollSkinning_SMGen_One_Weight_vp( 39 43 float4 position : POSITION, 40 float blendIdx : BLENDINDICES, 44 float4 blendIdx : BLENDINDICES, 45 float4 blendWgt : BLENDWEIGHT, 41 46 out float4 oPosition : POSITION, 42 47 out float3 cPos:TEXCOORD0, … … 48 53 { 49 54 // transform by indexed matrix 50 float4 blendPos = float4(mul(worldMatrix3x4Array[blendIdx], position).xyz, 1.0); 55 float4 blendPos = float4(0,0,0,1); 56 blendPos.xyz += mul(worldMatrix3x4Array[blendIdx[0]], position).xyz * blendWgt[0]; 57 blendPos.xyz += mul(worldMatrix3x4Array[blendIdx[1]], position).xyz * blendWgt[1]; 58 51 59 // view / projection 52 60 cPos = mul(viewMatrix, blendPos).xyz;
Note: See TracChangeset
for help on using the changeset viewer.