Changeset 12096
- Timestamp:
- Nov 11, 2018, 5:37:35 PM (6 years ago)
- Location:
- data/branches/Shader_HS18
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
r12092 r12096 7 7 pass ambient 8 8 { 9 // base colours, not needed for rendering, but as information 10 // to lighting pass categorisation routine 11 diffuse 0 0 0 9 // base colours, not needed for rendering, but as information 10 // to lighting pass categorisation routine 11 ambient 1 1 1 12 diffuse 0 0 0 13 specular 0 0 0 0 14 // Really basic vertex program 15 // NB we don't use fixed function here because GL does not like 16 // mixing fixed function and vertex programs, depth fighting can 17 // be an issue 18 vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTextureUnified 19 { 20 param_named_auto ambient ambient_light_colour 21 } 22 fragment_program_ref Ogre/BasicFragmentPrograms/PassthroughFP 23 { 24 } 25 12 26 } 13 27 // Now do the lighting pass … … 15 29 pass perlight 16 30 { 31 17 32 // do this for each light 18 33 iteration once_per_light … … 33 48 fragment_program_ref Examples/BumpMapFP 34 49 { 35 param_named_auto lightDiffuse light_diffuse_colour 0 50 param_named_auto lightDiffuse light_diffuse_colour 0 36 51 } 37 52 … … 47 62 shadow_receiver_fragment_program_ref Examples/BumpMapFPShadowRcv 48 63 { 49 param_named_auto lightDiffuse light_diffuse_colour 0 64 param_named_auto lightDiffuse light_diffuse_colour 0 50 65 } 51 66 52 67 // Base bump map 53 68 texture_unit normalmap … … 57 72 } 58 73 } 59 74 60 75 // Decal pass 61 76 pass decal 62 77 { 63 // hint to pass categorisation routine, that this is decal only 78 // base colours, not needed for rendering, but as information 79 // to lighting pass categorisation routine 64 80 lighting off 81 // Really basic vertex program 82 // NB we don't use fixed function here because GL does not like 83 // mixing fixed function and vertex programs, depth fighting can 84 // be an issue 85 65 86 scene_blend dest_colour zero 66 87 texture_unit decalmap 67 88 { 68 texture Cube_Lava_COLOR.jpg 89 texture Cube_Lava_COLOR.jpg 69 90 } 70 91 } -
data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl
r12091 r12096 14 14 { 15 15 gl_Position = worldViewProj * position; 16 colour = ambient;16 gl_FrontColor = ambient; 17 17 } -
data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl
r12091 r12096 14 14 uniform vec4 lightDiffuseColour[2]; 15 15 uniform vec4 ambient; 16 uniform vec4 diffuse; 16 17 17 18 void main() -
data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl
r12083 r12096 16 16 vec3 blendPos = vec3(0,0,0); 17 17 vec3 blendNorm = vec3(0,0,0); 18 18 19 19 for (int bone = 0; bone < 2; ++bone) 20 20 { … … 30 30 worldMatrix[2] = worldMatrix3x4Array[idx + 2]; 31 31 worldMatrix[3] = vec4(0); 32 // now weight this into final 32 // now weight this into final 33 33 float weight = blendWeights[bone]; 34 34 blendPos += (gl_Vertex * worldMatrix).xyz * weight; 35 35 36 36 mat3 worldRotMatrix = mat3(worldMatrix[0].xyz, worldMatrix[1].xyz, worldMatrix[2].xyz); 37 37 blendNorm += (gl_Normal * worldRotMatrix) * weight; … … 47 47 vec3 lightDir1 = normalize( 48 48 lightPos[1].xyz - (blendPos.xyz * lightPos[1].w)); 49 49 50 50 gl_FrontSecondaryColor = vec4(0); 51 gl_FrontColor = vec4(0.5, 0.5, 0.5, 1.0) 51 gl_FrontColor = vec4(0.5, 0.5, 0.5, 1.0) 52 52 + clamp(dot(lightDir0, blendNorm), 0.0, 1.0) * lightDiffuseColour[0] 53 53 + clamp(dot(lightDir1, blendNorm), 0.0, 1.0) * lightDiffuseColour[1]; 54 54 55 55 gl_TexCoord[0] = gl_MultiTexCoord0; 56 56 57 57 } -
data/branches/Shader_HS18/resources.oxr
r12091 r12096 13 13 <ResourceLocation path = "images/textures/stellarobjects"/> 14 14 <ResourceLocation path = "materials" /> 15 <ResourceLocation path = "materials/Example" /> 15 16 <ResourceLocation path = "models" /> 16 17 <ResourceLocation path = "packs/cubemap.zip" archiveType = "Zip"/> 17 18 <ResourceLocation path = "packs/skybox.zip" archiveType = "Zip"/> 18 19 19 20 <ResourceLocation path = "programs" /> 20 21 <ResourceLocation path = "programs/GLSL" />
Note: See TracChangeset
for help on using the changeset viewer.