Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 12096


Ignore:
Timestamp:
Nov 11, 2018, 5:37:35 PM (6 years ago)
Author:
wiesep
Message:

Working version

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  
    77        pass ambient
    88        {
    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
    1226        }
    1327        // Now do the lighting pass
     
    1529        pass perlight
    1630        {
     31
    1732            // do this for each light
    1833            iteration once_per_light
     
    3348            fragment_program_ref Examples/BumpMapFP
    3449            {
    35                 param_named_auto lightDiffuse light_diffuse_colour 0 
     50                param_named_auto lightDiffuse light_diffuse_colour 0
    3651            }
    3752
     
    4762            shadow_receiver_fragment_program_ref Examples/BumpMapFPShadowRcv
    4863            {
    49                 param_named_auto lightDiffuse light_diffuse_colour 0 
     64                param_named_auto lightDiffuse light_diffuse_colour 0
    5065            }
    51            
     66
    5267            // Base bump map
    5368            texture_unit normalmap
     
    5772            }
    5873        }
    59        
     74
    6075        // Decal pass
    6176        pass decal
    6277        {
    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
    6480            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           
    6586            scene_blend dest_colour zero
    6687            texture_unit decalmap
    6788            {
    68                 texture Cube_Lava_COLOR.jpg 
     89                texture Cube_Lava_COLOR.jpg
    6990            }
    7091        }
  • data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl

    r12091 r12096  
    1414{
    1515        gl_Position = worldViewProj * position;
    16         colour = ambient;
     16        gl_FrontColor = ambient;
    1717}
  • data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl

    r12091 r12096  
    1414uniform vec4 lightDiffuseColour[2];
    1515uniform vec4 ambient;
     16uniform vec4 diffuse;
    1617
    1718void main()
  • data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl

    r12083 r12096  
    1616        vec3 blendPos = vec3(0,0,0);
    1717        vec3 blendNorm = vec3(0,0,0);
    18        
     18
    1919        for (int bone = 0; bone < 2; ++bone)
    2020        {
     
    3030                worldMatrix[2] = worldMatrix3x4Array[idx + 2];
    3131                worldMatrix[3] = vec4(0);
    32                 // now weight this into final 
     32                // now weight this into final
    3333            float weight = blendWeights[bone];
    3434                blendPos += (gl_Vertex * worldMatrix).xyz * weight;
    35                
     35
    3636                mat3 worldRotMatrix = mat3(worldMatrix[0].xyz, worldMatrix[1].xyz, worldMatrix[2].xyz);
    3737                blendNorm += (gl_Normal * worldRotMatrix) * weight;
     
    4747        vec3 lightDir1 = normalize(
    4848                lightPos[1].xyz -  (blendPos.xyz * lightPos[1].w));
    49                
     49
    5050        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)
    5252                + clamp(dot(lightDir0, blendNorm), 0.0, 1.0) * lightDiffuseColour[0]
    5353                + clamp(dot(lightDir1, blendNorm), 0.0, 1.0) * lightDiffuseColour[1];
    5454
    5555        gl_TexCoord[0] = gl_MultiTexCoord0;
    56        
     56
    5757}
  • data/branches/Shader_HS18/resources.oxr

    r12091 r12096  
    1313    <ResourceLocation path = "images/textures/stellarobjects"/>
    1414    <ResourceLocation path = "materials"        />
     15    <ResourceLocation path = "materials/Example"        />
    1516    <ResourceLocation path = "models"           />
    1617    <ResourceLocation path = "packs/cubemap.zip" archiveType = "Zip"/>
    1718    <ResourceLocation path = "packs/skybox.zip"  archiveType = "Zip"/>
    18    
     19
    1920    <ResourceLocation path = "programs"         />
    2021    <ResourceLocation path = "programs/GLSL"    />
Note: See TracChangeset for help on using the changeset viewer.