Changeset 2398 for GTP/trunk/App/Demos/Illum
- Timestamp:
- 05/28/07 17:00:18 (17 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media
- Files:
-
- 10 added
- 11 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 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.hlsl
r2024 r2398 25 25 { 26 26 IN.texCoord += float2(0.5/width, 0.5/height); 27 // return 1; 27 28 return tex2D(Texture, IN.texCoord); 29 } 30 31 float4 AlphaBlend_PS(VS_OUT IN, 32 uniform float width, 33 uniform float height, 34 uniform float alpha, 35 uniform sampler2D Texture: register(s0)) : COLOR 36 { 37 IN.texCoord += float2(0.5/width, 0.5/height); 38 return float4(tex2D(Texture, IN.texCoord).rgb, alpha); 28 39 } 29 40 … … 153 164 //Color = pow(Color * half4(1.05f, 0.97f, 1.27f, 1.0f), Gain); 154 165 return Color + 0.0000000000001 * Gain; 166 //return gLum; 155 167 return float4(tex2D(GlobalLuminanceTexture, IN.texCoord).r, 156 168 tex2D(GlobalLuminanceTexture, IN.texCoord).r, -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.material
r2137 r2398 31 31 param_named_auto width viewport_width 32 32 param_named_auto height viewport_height 33 34 } 35 texture_unit 36 { 37 // filtering none 38 } 39 } 40 } 41 } 42 43 material GTP/PostProc/Blend 44 { 45 technique 46 { 47 pass 48 { 49 scene_blend alpha_blend 50 depth_check off 51 vertex_program_ref GTP/PostProc/PostProc_VS 52 { 53 54 } 55 fragment_program_ref GTP/PostProc/AlphaBlend_PS 56 { 57 param_named_auto width viewport_width 58 param_named_auto height viewport_height 59 param_named_auto alpha frame_time 9.0 33 60 34 61 } … … 179 206 { 180 207 scene_blend alpha_blend 208 depth_write off 209 depth_check off 181 210 vertex_program_ref GTP/PostProc/PostProc_VS 182 211 { … … 187 216 param_named_auto height viewport_height 188 217 param_named Stretch float 1.2 189 param_named timeBlur float 0.025 218 param_named_auto timeBlur frame_time 0.2 219 //param_named timeBlur float 1 190 220 } 191 221 texture_unit -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPPostProc.program
r2024 r2398 17 17 source GTPPostProc.hlsl 18 18 entry_point Copy_PS 19 target ps_2_0 20 } 21 22 fragment_program GTP/PostProc/AlphaBlend_PS hlsl 23 { 24 source GTPPostProc.hlsl 25 entry_point AlphaBlend_PS 19 26 target ps_2_0 20 27 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPPostProc/GTPToneMap.compositor
r2024 r2398 4 4 { 5 5 texture scene target_width target_height PF_FLOAT16_RGBA 6 texture luminance 256 256PF_FLOAT16_RGBA7 texture rt0 256 256PF_FLOAT16_RGBA6 texture luminance target_width target_height PF_FLOAT16_RGBA 7 texture rt0 512 512 PF_FLOAT16_RGBA 8 8 texture rt1 256 256 PF_FLOAT16_RGBA 9 9 texture rt2 128 128 PF_FLOAT16_RGBA … … 15 15 { 16 16 input previous 17 17 } 18 18 target luminance 19 19 { … … 25 25 } 26 26 } 27 28 29 27 30 target rt0 28 31 { 29 32 input none 30 33 pass render_quad 31 34 { 32 33 35 material GTP/PostProc/GlowBlurV 36 input 0 luminance 34 37 } 35 } 38 } 39 36 40 target rt1 37 41 { 38 42 input none 39 43 pass render_quad 40 44 { 41 45 material GTP/PostProc/GlowBlurH 42 46 input 0 rt0 43 47 } 44 48 } 49 45 50 target rt2 46 51 { … … 52 57 } 53 58 } 59 54 60 target rt3 55 61 { … … 61 67 } 62 68 } 69 63 70 target rt4 64 71 { … … 68 75 material GTP/PostProc/GlowBlurV 69 76 input 0 rt3 70 71 77 } 78 } 72 79 target rt5 73 80 { … … 77 84 { 78 85 } 86 // pass render_quad 87 // { 88 // material GTP/PostProc/Black 89 // } 79 90 } 80 91 target rt5 … … 91 102 } 92 103 } 104 // target_output 105 // { 106 // input none 107 // pass render_quad 108 // { 109 // material GTP/PostProc/Copy 110 // input 0 rt5 111 // } 112 // } 93 113 target_output 94 114 { … … 100 120 input 1 rt1 101 121 input 2 luminance 102 122 input 3 rt5 103 123 } 104 124 }
Note: See TracChangeset
for help on using the changeset viewer.