Changeset 1424 for GTP/trunk/App/Demos/Illum
- Timestamp:
- 09/21/06 08:35:22 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media
- Files:
-
- 3 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_HPS_Smoke_L.hlsl
r1355 r1424 7 7 float r : TEXCOORD2; 8 8 float4 center : TEXCOORD3; 9 float4 Color : TEXCOORD4; 9 10 }; 10 11 11 12 VS_OUT HPS_Smoke_L_VS (float4 position : POSITION, 12 13 float4 texCoord : TEXCOORD0, 13 14 float4 Color: COLOR0, 15 uniform float baseRadius, 14 16 uniform float4x4 worldView, 15 17 uniform float4x4 Proj, … … 17 19 { 18 20 VS_OUT OUT; 19 20 float2 offset = texCoord.zw; 21 float2 offset = texCoord.zw * baseRadius; 21 22 float4 cPosition; 22 23 cPosition = mul(worldView, position); … … 24 25 cPosition.xy += offset; 25 26 OUT.cPosition = cPosition; 26 OUT.r = abs( texCoord.z);27 OUT.r = abs(offset.x); 27 28 28 29 OUT.hPosition = mul( Proj, cPosition ); 29 30 30 OUT.texCoord = texCoord.xy; 31 OUT.texCoord = texCoord.xy; 32 OUT.Color = Color; 31 33 return OUT; 32 34 } … … 39 41 float4 Color = 0; 40 42 Color = tex2D(Texture, IN.texCoord); 41 Color = float4(1, 1, 1, Color.a) ;43 Color = float4(1, 1, 1, Color.a) * IN.Color; 42 44 return Color; 43 45 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_HPS_Smoke_S.hlsl
r1355 r1424 7 7 float r : TEXCOORD2; 8 8 float4 center : TEXCOORD3; 9 float4 Color : TEXCOORD4; 9 10 }; 10 11 11 12 VS_OUT HPS_Smoke_S_VS (float4 position : POSITION, 12 13 float4 texCoord : TEXCOORD0, 13 14 float4 Color: COLOR0, 14 15 uniform float4x4 worldView, 15 16 uniform float4x4 Proj, … … 28 29 OUT.hPosition = mul( Proj, cPosition ); 29 30 30 OUT.texCoord = texCoord.xy; 31 OUT.texCoord = texCoord.xy; 32 OUT.Color = Color; 31 33 return OUT; 32 34 } … … 42 44 float alpha = 0; 43 45 44 float d = length( IN.cPosition.xy z - IN.center.xyz);46 float d = length( IN.cPosition.xy- IN.center.xy); 45 47 46 48 if( d < IN.r ) … … 53 55 fPosition = mul(Proj, fPosition); 54 56 bPosition = mul(Proj, bPosition); 55 f = (fPosition.z / fPosition.w + 1.0) / 2.0;56 b = (bPosition.z / bPosition.w + 1.0) / 2.0;57 f = fPosition.z / fPosition.w; 58 b = bPosition.z / bPosition.w; 57 59 58 60 alpha = pow(w / IN.r, 4) * 0.5; … … 63 65 Color.r = b; 64 66 Color.g = 1 - f; 65 Color.a = alpha ;67 Color.a = alpha * IN.Color.a; 66 68 //Color.a = tex2D(Texture, IN.texCoord).a * 0.2; 67 69 -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools.material
r1336 r1424 11 11 //scene_blend_op_alpha add 12 12 //scene_blend_alpha add 13 depth_check off 13 14 depth_write off 14 15 15 ambient 1 0 0 116 diffuse 1 0 0 117 16 texture_unit 18 17 { … … 212 211 } 213 212 } 213 214 vertex_program PhaseVS hlsl 215 { 216 source GameTools_Phase.hlsl 217 entry_point PhaseVS 218 target vs_2_0 219 } 220 221 fragment_program Phase_HenyeyGreenSteinPS hlsl 222 { 223 source GameTools_Phase.hlsl 224 entry_point HenyeyGreensteinPS 225 target ps_2_0 226 } 227 228 material Phase_HenyeyGreenStein 229 { 230 231 technique 232 { 233 234 pass 235 { 236 vertex_program_ref PhaseVS 237 { 238 239 } 240 fragment_program_ref Phase_HenyeyGreenSteinPS 241 { 242 243 } 244 245 } 246 } 247 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/GameTools_HPS.material
r1355 r1424 75 75 particle_script GameTools/Little 76 76 perspective false 77 } 77 vparam_radius baseRadius 78 } 79 78 80 } 79 81 … … 82 84 param_named_auto worldViewProj worldviewproj_matrix 83 85 param_named_auto worldView worldview_matrix 84 param_named_auto Proj projection_matrix 86 param_named_auto Proj projection_matrix 85 87 } 86 88 fragment_program_ref HPS_Smoke_L_PS … … 92 94 scene_blend alpha_blend 93 95 94 texture_unit 95 { 96 97 } 96 //impostor texture 97 texture_unit 98 { 99 100 } 101 98 102 99 103 } … … 101 105 } 102 106 103 104 107 vertex_program HPS_Smoke_L_Depth_VS hlsl 108 { 109 source GameTools_HPS_Smoke_L_Depth.hlsl 110 entry_point HPS_Smoke_L_Depth_Illum_VS 111 target vs_3_0 112 } 113 114 fragment_program HPS_Smoke_L_Depth_PS hlsl 115 { 116 source GameTools_HPS_Smoke_L_Depth.hlsl 117 entry_point HPS_Smoke_L_Depth_Illum_PS 118 target ps_3_0 119 } 120 121 122 123 material HPS_SMOKE_L_Depth 124 { 125 technique 126 { 127 pass 128 { 129 IllumTechniques 130 { 131 RenderTechnique HPS 132 { 133 particle_script GameTools/Little 134 perspective false 135 vparam_radius baseRadius 136 update_interval 1 137 } 138 RenderTechnique SphericalBillboard 139 { 140 texture_unit_id 1 141 } 142 RenderTechnique IllumVolume 143 { 144 update_interval 1 145 //depths 4 146 resolution 128 147 } 148 } 149 150 vertex_program_ref HPS_Smoke_L_Depth_VS 151 { 152 param_named_auto worldViewProj worldviewproj_matrix 153 param_named_auto worldView worldview_matrix 154 param_named_auto worldViewInv inverse_worldview_matrix 155 param_named_auto Proj projection_matrix 156 param_named_auto width viewport_width 157 param_named_auto height viewport_height 158 } 159 fragment_program_ref HPS_Smoke_L_Depth_PS 160 { 161 param_named_auto Proj projection_matrix 162 param_named_auto farplane far_clip_distance 163 164 165 } 166 167 depth_check off 168 depth_write off 169 scene_blend alpha_blend 170 171 //impostor texture 172 texture_unit 173 { 174 //filtering none 175 } 176 //scene depth texture 177 texture_unit 178 { 179 filtering none 180 } 181 //lightVolume 182 texture_unit 183 { 184 //filtering none 185 } 186 187 } 188 } 189 } 190 191 vertex_program Smoke_IllumVolume_VS hlsl 192 { 193 source GameTools_Smoke_IllumVolume.hlsl 194 entry_point SmokeIllumVolumeVS 195 target vs_3_0 196 } 197 198 fragment_program HPS_IllumVolume_PS hlsl 199 { 200 source GameTools_Smoke_IllumVolume.hlsl 201 entry_point SmokeIllumVolumePS 202 target ps_3_0 203 } 204 205 material Smoke_IllumVolume 206 { 207 208 technique 209 { 210 pass 211 { 212 213 cull_hardware none 214 cull_software none 215 lighting off 216 scene_blend zero one_minus_src_colour 217 depth_write off 218 219 vertex_program_ref Smoke_IllumVolume_VS 220 { 221 param_named_auto worldViewProj worldviewproj_matrix 222 param_named_auto worldView worldview_matrix 223 param_named_auto Proj projection_matrix 224 } 225 fragment_program_ref HPS_IllumVolume_PS 226 { 227 228 } 229 230 texture_unit 231 { 232 texture pamacs.dds 233 } 234 235 } 236 } 237 } 238 -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/Particles.material
r1336 r1424 109 109 { 110 110 texture 111 } 112 113 111 } 114 112 } 115 113 } 116 114 } 115 -
GTP/trunk/App/Demos/Illum/Ogre/Media/particle/GameTools.particle
r1355 r1424 44 44 GameTools/Big 45 45 { 46 //material GameTools/HPS 47 material HPS_SMOKE_L 48 //material Flare 49 particle_width 200 50 particle_height 200 46 renderer sprite 47 48 material HPS_SMOKE_L_Depth 49 //material GameTools/SpriteShader 50 particle_width 1.6 51 particle_height 1.6 51 52 cull_each false 52 quota 3053 quota 20 53 54 billboard_type point 55 sorted true 54 56 55 57 // Area emitter 56 emitter Box58 emitter Ellipsoid 57 59 { 58 // colour 0.7 0.8 0.3059 // 60 //colour_range_end 0.8 1 0.5060 colour 1 1 1 0 61 //colour_range_start 1 1 1 0 62 //colour_range_end 1 1 1 0 61 63 62 64 angle 30 63 65 emission_rate 6 64 time_to_live 366 time_to_live 6000000000 65 67 direction 0 1 0 66 68 velocity 0 67 width 1 2068 height 1 2069 depth 3069 width 100 70 height 100 71 depth 100 70 72 } 71 73 72 74 // Make em float upwards 73 affector LinearForce74 {75 force_vector 0 40 076 force_application add77 }75 // affector LinearForce 76 // { 77 // force_vector 0 40 0 78 // force_application add 79 // } 78 80 79 81 affector ColourFader2 … … 81 83 alpha1 +0.5 82 84 alpha2 -0.5 83 state_change 0.585 state_change 3 84 86 } 85 87 } … … 91 93 material HPS_SMOKE_S 92 94 renderer sprite 93 particle_width 4094 particle_height 4095 particle_width 32 96 particle_height 32 95 97 cull_each false 96 quota 10098 quota 400 97 99 billboard_type point 98 100 99 101 // Area emitter 100 emitter Point102 emitter Ellipsoid 101 103 { 102 // colour 0.7 0.8 0.30103 colour_range_start 1 1 1 0104 colour_range_end 0.8 1 0.50104 colour 1 1 1 0 105 //colour_range_start 1 1 1 0 106 //colour_range_end 1 1 1 0 105 107 106 108 angle 160 107 109 emission_rate 20 108 time_to_live 3110 time_to_live 6 109 111 direction 0 1 0 110 velocity 20 111 // width 120 112 // height 120 113 // depth 30 112 velocity 5 113 114 width 50 115 height 50 116 depth 50 114 117 } 115 118 … … 118 121 alpha1 +0.5 119 122 alpha2 -0.5 120 state_change 0.5123 state_change 2 121 124 } 122 125 }
Note: See TracChangeset
for help on using the changeset viewer.