Changeset 2376 for GTP/trunk/App
- Timestamp:
- 05/16/07 08:33:51 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/MoriaHallBase.hlsl
r2373 r2376 41 41 42 42 uniform float specularity; 43 uniform float4 specularColor; 43 44 44 45 … … 96 97 //light1 97 98 //light dir 98 float3 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 99 float3 L; 100 float4 col; 101 float3 lightCPos; 102 float shadow; 103 104 if(dot(lightColor1, lightColor1) != 0) 105 { 106 L = wLightPos1.xyz - IN.wPos * wLightPos1.w; 99 107 //illumination 100 float4 col; 101 col = Illumination(N, L, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity); 108 col = Illumination(N, L, V, lightColor1 * lightPower1, lightRange1, diffuseColor, specularity, specularColor); 102 109 //shadowing 103 float3lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz;104 floatshadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1);110 lightCPos = mul(LightView1, float4(IN.wPos, 1)).xyz; 111 shadow = shadowPoint(ShadowMap1Point, lightCPos, lightFarPlane1); 105 112 Color += col * shadow; 113 } 106 114 107 115 //---------------------------------------------------------------------------------------------------------------- 108 116 //light2 117 /*if(dot(lightColor2, lightColor2) != 0) 118 { 109 119 //light dir 110 120 L = wLightPos2.xyz - IN.wPos * wLightPos2.w; 111 121 //illumination 112 col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity );122 col = Illumination(N, L, V, lightColor2 * lightPower2, lightRange2, diffuseColor, specularity, specularColor); 113 123 //shadowing 114 124 lightCPos = mul(LightView2, float4(IN.wPos, 1)).xyz; 115 125 shadow = shadowPoint(ShadowMap2Point, lightCPos, lightFarPlane2); 116 126 Color += col * shadow; 127 }*/ 117 128 118 129 //do Path Map to gather indirect illumination 119 130 120 float4 indirect = PathMapIndirect(PathMap, WeightIndexMap, WeightMap, IN.texCoord2.zw) * 1.2;121 indirect *= diffuseColor;122 Color = Color + indirect;131 // float4 indirect = PathMapIndirect(PathMap, WeightIndexMap, WeightMap, IN.texCoord2.zw) * 1.2; 132 // indirect *= diffuseColor; 133 // Color = Color + indirect; 123 134 124 135 //gather caustics for all casters -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/illum.hlsl
r2373 r2376 1 1 2 float4 Illumination(float3 N, float3 L, float3 V, float4 lightColor, float4 lightRange, float4 diffuseColor, float specularity )2 float4 Illumination(float3 N, float3 L, float3 V, float4 lightColor, float4 lightRange, float4 diffuseColor, float specularity, float4 specularColor) 3 3 { 4 4 // Blinn lighting … … 8 8 float4 Lighting = lit(dot(N, L), dot(N, H), specularity); 9 9 10 return lightColor * (Lighting.y * diffuseColor + Lighting.z ) //color10 return lightColor * (Lighting.y * diffuseColor + Lighting.z * specularColor) //color 11 11 / (lightRange.y + d * lightRange.z + d * d * lightRange.w) //attenuation 12 12 ; … … 64 64 65 65 float3 col = 0; 66 for(int iCluster = 0; iCluster < 32; iCluster++)66 for(int iCluster = 0; iCluster < 8; iCluster++) 67 67 { 68 68 float2 prmTexPos = float2( -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/moria.material
r2373 r2376 21 21 IllumTechniques 22 22 { 23 RenderTechnique PathMap24 {25 new_passes false26 start_tex_id 327 }23 //RenderTechnique PathMap 24 //{ 25 // new_passes false 26 // start_tex_id 3 27 //} 28 28 RenderTechnique DepthShadowReceiver 29 29 { 30 max_light_count 230 max_light_count 1 31 31 set_light_viewproj false 32 32 set_light_view true … … 56 56 param_named_auto lightColor1 light_diffuse_colour 0 57 57 param_named_auto lightColor2 light_diffuse_colour 1 58 param_named specularity float 120 58 param_named specularity float 20 59 param_named specularColor float4 0.2 0.2 0.2 0.2 59 60 } 60 61 texture_unit tile_texture -
GTP/trunk/App/Demos/Illum/Ogre/Media/MORIA/troll.material
r2368 r2376 84 84 } 85 85 86 material trollCameraDepth 87 { 88 technique 89 { 90 pass 91 { 92 vertex_program_ref TrollSkinningSMGen 93 { 94 param_named_auto worldMatrix3x4Array[0] world_matrix_array_3x4 95 param_named_auto viewProjectionMatrix viewproj_matrix 96 param_named_auto viewMatrix view_matrix 97 } 98 fragment_program_ref GTP/Basic/CDepth_PS 99 { 100 param_named_auto farplane far_clip_distance 101 } 102 } 103 } 104 } 105 86 106 material trollBase 87 107 { … … 95 115 { 96 116 ILLUM_TRIGGER_SM_POINT trollShadowMapGen_POINT 117 ILLUM_TRIGGER_CAMERADEPTH trollCameraDepth 97 118 } 98 119 }
Note: See TracChangeset
for help on using the changeset viewer.