Changeset 5137 for data/Media/materials/scripts/asteroids.material
- Timestamp:
- May 29, 2008, 11:55:46 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/Media/materials/scripts/asteroids.material
r5136 r5137 15 15 } 16 16 17 // A really basic ambient pass program, support for one texture coodinate set18 vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl19 {20 source AmbientOneTexture.glsl21 22 default_params23 {24 param_named_auto ambient ambient_light_colour25 }26 }27 17 28 18 … … 93 83 { 94 84 param_named_auto worldViewProj worldviewproj_matrix 95 param_named ambient float3 0.1 0.1 0.185 param_named_auto ambient ambient_light_colour 96 86 } 97 87 … … 169 159 } 170 160 } 171 172 } 173 174 175 161 // This is the fallback which cards which don't have fragment program 162 // support will use, NB does not support specular colour 163 // Note that it still requires vertex program support 164 technique 165 { 166 // Base ambient pass 167 pass 168 { 169 // base colours, not needed for rendering, but as information 170 // to lighting pass categorisation routine 171 ambient 1 1 1 172 diffuse 0 0 0 173 specular 0 0 0 0 174 // Really basic vertex program 175 // NB we don't use fixed function here because GL does not like 176 // mixing fixed function and vertex programs, depth fighting can 177 // be an issue 178 vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture 179 { 180 param_named_auto worldViewProj worldviewproj_matrix 181 param_named_auto ambient ambient_light_colour 182 } 183 184 } 185 // Now do the lighting pass 186 // NB we don't do decal texture here because this is repeated per light 187 pass 188 { 189 // base colours, not needed for rendering, but as information 190 // to lighting pass categorisation routine 191 ambient 0 0 0 192 // do this for each light 193 iteration once_per_light 194 195 196 scene_blend add 197 198 // Vertex program reference 199 vertex_program_ref BumpMapVP 200 { 201 param_named_auto lightPosition light_position_object_space 0 202 param_named_auto worldViewProj worldviewproj_matrix 203 } 204 205 // Base bump map 206 texture_unit 207 { 208 texture nmrock.tga 209 colour_op replace 210 } 211 // Normalisation cube map, with dot product on bump map 212 texture_unit 213 { 214 cubic_texture nm.tga combinedUVW 215 tex_coord_set 1 216 tex_address_mode clamp 217 colour_op_ex dotproduct src_texture src_current 218 colour_op_multipass_fallback dest_colour zero 219 } 220 } 221 222 // Decal pass 223 pass 224 { 225 lighting off 226 // Really basic vertex program 227 // NB we don't use fixed function here because GL does not like 228 // mixing fixed function and vertex programs, depth fighting can 229 // be an issue 230 vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture 231 { 232 param_named_auto worldViewProj worldviewproj_matrix 233 param_named ambient float4 1 1 1 1 234 } 235 scene_blend dest_colour zero 236 texture_unit 237 { 238 texture rock.tga 239 } 240 241 } 242 243 } 244 245 246 } 247 248 249
Note: See TracChangeset
for help on using the changeset viewer.