[Orxonox-commit 7490] r12096 - in data/branches/Shader_HS18: . materials materials/Example programs/Example/GLSL120 programs/OLD

wiesep at orxonox.net wiesep at orxonox.net
Sun Nov 11 17:37:35 CET 2018


Author: wiesep
Date: 2018-11-11 17:37:35 +0100 (Sun, 11 Nov 2018)
New Revision: 12096

Added:
   data/branches/Shader_HS18/materials/Example/
   data/branches/Shader_HS18/materials/Example/Examples-Advanced.program
   data/branches/Shader_HS18/materials/Example/Examples.program
Modified:
   data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
   data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl
   data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl
   data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl
   data/branches/Shader_HS18/resources.oxr
Log:
Working version

Modified: data/branches/Shader_HS18/materials/Cube_Lava_Normal.material
===================================================================
--- data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	2018-11-11 15:45:00 UTC (rev 12095)
+++ data/branches/Shader_HS18/materials/Cube_Lava_Normal.material	2018-11-11 16:37:35 UTC (rev 12096)
@@ -6,14 +6,29 @@
         // Base ambient pass
         pass ambient
         {
-            // base colours, not needed for rendering, but as information
-            // to lighting pass categorisation routine
-            diffuse 0 0 0
+          // base colours, not needed for rendering, but as information
+          // to lighting pass categorisation routine
+          ambient 1 1 1
+          diffuse 0 0 0
+          specular 0 0 0 0
+          // Really basic vertex program
+          // NB we don't use fixed function here because GL does not like
+          // mixing fixed function and vertex programs, depth fighting can
+          // be an issue
+          vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTextureUnified
+          {
+            param_named_auto ambient ambient_light_colour
+          }
+          fragment_program_ref Ogre/BasicFragmentPrograms/PassthroughFP
+          {
+          }
+
         }
         // Now do the lighting pass
         // NB we don't do decal texture here because this is repeated per light
         pass perlight
         {
+
             // do this for each light
             iteration once_per_light
             scene_blend add
@@ -32,7 +47,7 @@
             // Fragment program
             fragment_program_ref Examples/BumpMapFP
             {
-                param_named_auto lightDiffuse light_diffuse_colour 0 
+                param_named_auto lightDiffuse light_diffuse_colour 0
             }
 
             // texture shadow receiver program
@@ -46,9 +61,9 @@
             // Additive texture shadow receiver program
             shadow_receiver_fragment_program_ref Examples/BumpMapFPShadowRcv
             {
-                param_named_auto lightDiffuse light_diffuse_colour 0 
+                param_named_auto lightDiffuse light_diffuse_colour 0
             }
-            
+
             // Base bump map
             texture_unit normalmap
             {
@@ -56,16 +71,22 @@
                 colour_op replace
             }
         }
-        
+
         // Decal pass
         pass decal
         {
-            // hint to pass categorisation routine, that this is decal only
+            // base colours, not needed for rendering, but as information
+            // to lighting pass categorisation routine
             lighting off
+            // Really basic vertex program
+            // NB we don't use fixed function here because GL does not like
+            // mixing fixed function and vertex programs, depth fighting can
+            // be an issue
+            
             scene_blend dest_colour zero
             texture_unit decalmap
             {
-                texture Cube_Lava_COLOR.jpg 
+                texture Cube_Lava_COLOR.jpg
             }
         }
     }

Added: data/branches/Shader_HS18/materials/Example/Examples-Advanced.program
===================================================================
--- data/branches/Shader_HS18/materials/Example/Examples-Advanced.program	                        (rev 0)
+++ data/branches/Shader_HS18/materials/Example/Examples-Advanced.program	2018-11-11 16:37:35 UTC (rev 12096)
@@ -0,0 +1,229 @@
+//------------------------
+// Bump mapping section
+//------------------------
+
+// Bump map vertex program, support for this is required
+vertex_program Examples/BumpMapVPCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point main_vp
+	profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+}
+
+vertex_program Examples/BumpMapVPGLSLES glsles
+{
+	source Example_BumpMappingVp.glsles
+	profiles glsles
+}
+
+vertex_program Examples/BumpMapVPGLSL glsl
+{
+	source Example_BumpMappingVp.glsl
+	syntax glsl
+}
+
+vertex_program Examples/BumpMapVP unified
+{
+	delegate Examples/BumpMapVPGLSL
+	delegate Examples/BumpMapVPGLSLES
+	delegate Examples/BumpMapVPCg
+}
+
+// Bump map vertex program, with tangent parity support for this is required
+vertex_program Examples/BumpMapVPTangentParityCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point main_vp
+	profiles vs_1_1 arbvp1
+	compile_arguments -DTANGENTS_HAVE_PARITY=1
+}
+
+// Bump map vertex program, with tangent parity support for this is required
+vertex_program Examples/BumpMapVPTangentParityGLSLES glsles
+{
+	source BumpMapVPTangentParity.glsles
+}
+
+vertex_program Examples/BumpMapVPTangentParityGLSL glsl
+{
+	source BumpMapVPTangentParity.glsl
+	syntax glsl
+}
+
+vertex_program Examples/BumpMapVPTangentParity unified
+{
+	delegate Examples/BumpMapVPTangentParityGLSL
+	delegate Examples/BumpMapVPTangentParityGLSLES
+	delegate Examples/BumpMapVPTangentParityCg
+}
+
+// Bump map fragment program, support for this is optional
+fragment_program Examples/BumpMapFPCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point main_fp
+	profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0 arbfp1 fp20
+}
+
+fragment_program Examples/BumpMapFPGLSLES glsles
+{
+	source Example_BumpMappingFp.glsles
+	profiles glsles
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named normalMap int 0
+	}
+}
+
+fragment_program Examples/BumpMapFPGLSL glsl
+{
+	source Example_BumpMappingFp.glsl
+	syntax glsl
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named normalMap int 0
+	}
+}
+
+fragment_program Examples/BumpMapFP unified
+{
+	delegate Examples/BumpMapFPGLSL
+	delegate Examples/BumpMapFPGLSLES
+	delegate Examples/BumpMapFPCg
+}
+
+// Bump map vertex program shadow receiver
+vertex_program Examples/BumpMapVPShadowRcvCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point main_shadowreceiver_vp
+	profiles vs_1_1 arbvp1
+}
+
+// Bump map vertex program shadow receiver
+vertex_program Examples/BumpMapVPShadowRcvGLSLES glsles
+{
+	source Example_BumpMappingShadowRcvVp.glsles
+	profiles glsles
+}
+
+vertex_program Examples/BumpMapVPShadowRcvGLSL glsl
+{
+	source Example_BumpMappingShadowRcvVp.glsl
+	syntax glsl
+}
+
+vertex_program Examples/BumpMapVPShadowRcv unified
+{
+	delegate Examples/BumpMapVPShadowRcvGLSL
+	delegate Examples/BumpMapVPShadowRcvGLSLES
+	delegate Examples/BumpMapVPShadowRcvCg
+}
+
+// Bump map fragment program shadow receiver, support for this is optional
+fragment_program Examples/BumpMapFPShadowRcvCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point main_shadowreceiver_fp
+	profiles ps_2_0 arbfp1 fp20
+}
+
+// Bump map fragment program shadow receiver, support for this is optional
+fragment_program Examples/BumpMapFPShadowRcvGLSLES glsles
+{
+	source Example_BumpMappingShadowRcvFp.glsles
+	profiles glsles
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named shadowMap int 0
+		param_named normalMap int 1
+	}
+}
+
+fragment_program Examples/BumpMapFPShadowRcvGLSL glsl
+{
+	source Example_BumpMappingShadowRcvFp.glsl
+	syntax glsl
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named shadowMap int 0
+		param_named normalMap int 1
+	}
+}
+
+fragment_program Examples/BumpMapFPShadowRcv unified
+{
+	delegate Examples/BumpMapFPShadowRcvGLSL
+	delegate Examples/BumpMapFPShadowRcvGLSLES
+	delegate Examples/BumpMapFPShadowRcvCg
+}
+
+// Bump map with specular vertex program, support for this is required
+vertex_program Examples/BumpMapVPSpecularCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point specular_vp
+	profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+}
+
+// Bump map with specular vertex program, support for this is required
+vertex_program Examples/BumpMapVPSpecularGLSLES glsles
+{
+	source Example_BumpMappingSpecularVp.glsles
+	profiles glsles
+}
+
+vertex_program Examples/BumpMapVPSpecularGLSL glsl
+{
+	source Example_BumpMappingSpecularVp.glsl
+	syntax glsl
+}
+
+vertex_program Examples/BumpMapVPSpecular unified
+{
+	delegate Examples/BumpMapVPSpecularGLSL
+	delegate Examples/BumpMapVPSpecularGLSLES
+	delegate Examples/BumpMapVPSpecularCg
+}
+
+// Bump map fragment program, support for this is optional
+fragment_program Examples/BumpMapFPSpecularCg cg
+{
+	source Example_BumpMapping.cg
+	entry_point specular_fp
+	profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0 arbfp1 fp20
+}
+
+// Bump map fragment program, support for this is optional
+fragment_program Examples/BumpMapFPSpecularGLSLES glsles
+{
+	source Example_BumpMappingSpecularFp.glsles
+	profiles glsles
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named normalMap int 0
+	}
+}
+
+fragment_program Examples/BumpMapFPSpecularGLSL glsl
+{
+	source Example_BumpMappingSpecularFp.glsl
+	syntax glsl
+	default_params
+	{
+		// assign samplers as required by GLSL
+		param_named normalMap int 0
+	}
+}
+
+fragment_program Examples/BumpMapFPSpecular unified
+{
+	delegate Examples/BumpMapFPSpecularGLSL
+	delegate Examples/BumpMapFPSpecularGLSLES
+	delegate Examples/BumpMapFPSpecularCg
+}

Added: data/branches/Shader_HS18/materials/Example/Examples.program
===================================================================
--- data/branches/Shader_HS18/materials/Example/Examples.program	                        (rev 0)
+++ data/branches/Shader_HS18/materials/Example/Examples.program	2018-11-11 16:37:35 UTC (rev 12096)
@@ -0,0 +1,666 @@
+//---------------------------------------------------
+// This file includes a number of basic GPU programs
+// for use in many materials.
+//---------------------------------------------------
+
+
+// A really basic ambient pass program, support for one texture coordinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureCg cg
+{
+    source Example_Basic.cg
+    entry_point ambientOneTexture_vp
+    profiles vs_1_1 arbvp1
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureCgSm4 cg
+{
+    source Example_Basic_sm4.cg
+    entry_point ambientOneTexture_vp
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point ambientOneTexture_vp
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl
+{
+    source AmbientOneTexture.glsl
+
+    default_params
+    {
+        param_named_auto ambient ambient_light_colour
+        param_named_auto worldViewProj worldviewproj_matrix
+    }
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSLES glsles
+{
+    source AmbientOneTexture.glsles
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureWithUVGLSLES glsles
+{
+    source AmbientOneTextureWithUV.glsles
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureWithUVGLSL glsl
+{
+    source AmbientOneTextureWithUV.glsl
+
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureWithUV unified
+{
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureWithUVGLSL
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureWithUVGLSLES
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureHLSL
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureCg
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureCgSm4
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureUnified unified
+{
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureGLSL
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureGLSLES
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureHLSL
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureCg
+    delegate Ogre/BasicVertexPrograms/AmbientOneTextureCgSm4
+}
+
+fragment_program Ogre/BasicFragmentPrograms/DiffuseOneTextureCg cg
+{
+    source Example_Basic.cg
+    entry_point diffuseOneTexture_fp
+    profiles ps_2_0 arbfp1
+}
+
+fragment_program Ogre/BasicFragmentPrograms/DiffuseOneTextureHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point diffuseOneTexture_fp
+    target ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
+}
+
+fragment_program Ogre/BasicFragmentPrograms/DiffuseOneTextureGLSLES glsles
+{
+    source DiffuseOneTexture.glsles
+    default_params
+    {
+        param_named texMap int 0
+    }
+}
+
+fragment_program Ogre/BasicFragmentPrograms/DiffuseOneTextureGLSL glsl
+{
+    source DiffuseOneTexture.glsl
+    default_params
+    {
+        param_named texMap int 0
+    }
+}
+
+fragment_program Ogre/BasicFragmentPrograms/DiffuseOneTexture unified
+{
+    delegate Ogre/BasicFragmentPrograms/DiffuseOneTextureGLSL
+    delegate Ogre/BasicFragmentPrograms/DiffuseOneTextureGLSLES
+	delegate Ogre/BasicFragmentPrograms/DiffuseOneTextureHLSL
+    delegate Ogre/BasicFragmentPrograms/DiffuseOneTextureCg
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFP unified
+{
+    delegate Ogre/BasicFragmentPrograms/PassthroughFpGLSL
+    delegate Ogre/BasicFragmentPrograms/PassthroughFpGLSLES
+	delegate Ogre/BasicFragmentPrograms/PassthroughFpHLSL
+    delegate Ogre/BasicFragmentPrograms/PassthroughFpCgSm4
+    delegate Ogre/BasicFragmentPrograms/PassthroughFpCg
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpCgSm4 cg
+{
+    entry_point main
+    source PassthroughFP_sm4.cg
+    profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpHLSL hlsl
+{
+    entry_point main
+    source PassthroughFP_sm4.hlsl
+    target ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
+}
+
+
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpCg cg
+{
+    entry_point mainCg
+    source PassthroughFP.cg
+    profiles ps_2_0 arbfp1
+}
+
+// A really basic ambient pass program, support for one texture coordinate set
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpCgSm4ForAmbientOneTexture cg
+{
+    entry_point mainForAmbientOneTexture
+    source PassthroughFP_sm4.cg
+    profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3
+}
+
+
+// A really basic ambient pass program, support for one texture coordinate set
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpGLSLES glsles
+{
+    source PassthroughFP.glsles
+}
+
+fragment_program Ogre/BasicFragmentPrograms/PassthroughFpGLSL glsl
+{
+    source PassthroughFP.glsl
+}
+
+// Same as below, but for use when rendering texture shadows
+vertex_program Ogre/HardwareSkinningOneWeightShadowCaster cg
+{
+    source Example_Basic.cg
+    entry_point hardwareSkinningOneWeightCaster_vp
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+    includes_skeletal_animation true
+}
+// Basic hardware skinning using one indexed weight per vertex
+vertex_program Ogre/HardwareSkinningOneWeight cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningOneWeight_vp
+   profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+   includes_skeletal_animation true
+}
+// Same as below, but for use when rendering texture shadows
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterCg cg
+{
+    source Example_Basic.cg
+    entry_point hardwareSkinningTwoWeightsCaster_vp
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+    includes_skeletal_animation true
+}
+
+// Same as below, but for use when rendering texture shadows
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwareSkinningTwoWeightsCaster_vp
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+    includes_skeletal_animation true
+    column_major_matrices false
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL glsl
+{
+    source skinningTwoWeightsShadowCasterVp.glsl
+    includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterGLSLES glsles
+{
+    source skinningTwoWeightsShadowCasterVp.glsles
+    includes_skeletal_animation true
+    use_optimiser false
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCaster unified
+{
+    delegate Ogre/HardwareSkinningTwoWeightsShadowCasterGLSLES
+    delegate Ogre/HardwareSkinningTwoWeightsShadowCasterHLSL
+    delegate Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL
+    delegate Ogre/HardwareSkinningTwoWeightsShadowCasterCg
+}
+
+// Basic hardware skinning using two indexed weights per vertex
+vertex_program Ogre/HardwareSkinningTwoWeightsHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwareSkinningTwoWeights_vp
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+    includes_skeletal_animation true
+    column_major_matrices false
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsGLSL glsl
+{
+    source skinningTwoWeightsVp.glsl
+    includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsGLSLES glsles
+{
+    source skinningTwoWeightsVp.glsles
+    includes_skeletal_animation true
+    use_optimiser false
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsCg cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningTwoWeights_vp
+   profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+   includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeights unified
+{
+    delegate Ogre/HardwareSkinningTwoWeightsGLSL
+    delegate Ogre/HardwareSkinningTwoWeightsGLSLES
+    delegate Ogre/HardwareSkinningTwoWeightsHLSL
+    delegate Ogre/HardwareSkinningTwoWeightsCg
+
+    default_params
+    {
+        param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+        param_named_auto viewProjectionMatrix viewproj_matrix
+        param_named_auto lightPos[0] light_position 0
+        param_named_auto lightPos[1] light_position 1
+        param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
+        param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
+        param_named_auto ambient ambient_light_colour
+        param_named_auto diffuse surface_diffuse_colour
+    }
+}
+
+// Basic hardware skinning using four indexed weights per vertex
+vertex_program Ogre/HardwareSkinningFourWeightsCg cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningFourWeights_vp
+   profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+   includes_skeletal_animation true
+
+   default_params
+   {
+        param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+        param_named_auto viewProjectionMatrix viewproj_matrix
+        param_named_auto lightPos[0] light_position 0
+        param_named_auto lightPos[1] light_position 1
+        param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
+        param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
+        param_named_auto ambient ambient_light_colour
+   }
+}
+
+// Basic hardware morph animation (no normals)
+vertex_program Ogre/HardwareMorphAnimationCg cg
+{
+    source Example_Basic.cg
+    entry_point hardwareMorphAnimation
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+vertex_program Ogre/HardwareSkinningFourWeightsHLSL hlsl
+{
+   source Example_Basic4.hlsl
+   entry_point hardwareSkinningFourWeights_vp
+   target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+   includes_skeletal_animation true
+
+   default_params
+   {
+        param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+        param_named_auto viewProjectionMatrix viewproj_matrix
+        param_named_auto lightPos[0] light_position 0
+        param_named_auto lightPos[1] light_position 1
+        param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
+        param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
+        param_named_auto ambient ambient_light_colour
+   }
+}
+
+// Basic hardware morph animation (no normals)
+vertex_program Ogre/HardwareMorphAnimationHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwareMorphAnimation
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+// Basic hardware morph animation (no normals)
+vertex_program Ogre/HardwareMorphAnimationGLSLES glsles
+{
+    source HardwareMorphAnimationVp.glsles
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+// Basic hardware morph animation (no normals)
+vertex_program Ogre/HardwareMorphAnimationGLSL glsl
+{
+    source HardwareMorphAnimationVp.glsl
+    syntax glsl150
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+vertex_program Ogre/HardwareSkinningFourWeights unified
+{
+	delegate Ogre/HardwareSkinningFourWeightsHLSL
+	delegate Ogre/HardwareSkinningFourWeightsCg
+}
+
+vertex_program Ogre/HardwareMorphAnimation unified
+{
+	 delegate Ogre/HardwareMorphAnimationHLSL
+    delegate Ogre/HardwareMorphAnimationCg
+    delegate Ogre/HardwareMorphAnimationGLSL
+    delegate Ogre/HardwareMorphAnimationGLSLES
+}
+
+// Basic hardware pose animation supporting 2 active poses (no normals)
+vertex_program Ogre/HardwarePoseAnimationCg cg
+{
+    source Example_Basic.cg
+    entry_point hardwarePoseAnimation
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (no normals)
+vertex_program Ogre/HardwarePoseAnimationHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwarePoseAnimation
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (no normals)
+vertex_program Ogre/HardwarePoseAnimationGLSLES glsles
+{
+    source HardwarePoseAnimationVp.glsles
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (no normals)
+vertex_program Ogre/HardwarePoseAnimationGLSL glsl
+{
+    source HardwarePoseAnimationVp.glsl
+    syntax glsl150
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+    }
+}
+vertex_program Ogre/HardwarePoseAnimation unified
+{
+	delegate Ogre/HardwarePoseAnimationHLSL
+    delegate Ogre/HardwarePoseAnimationCg
+    delegate Ogre/HardwarePoseAnimationGLSL
+    delegate Ogre/HardwarePoseAnimationGLSLES
+}
+
+// Basic hardware morph animation (with normals)
+vertex_program Ogre/HardwareMorphAnimationWithNormalsCg cg
+{
+    source Example_Basic.cg
+    entry_point hardwareMorphAnimationWithNormals
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// Basic hardware morph animation (with normals)
+vertex_program Ogre/HardwareMorphAnimationWithNormalsHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwareMorphAnimationWithNormals
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// Basic hardware morph animation (with normals)
+vertex_program Ogre/HardwareMorphAnimationWithNormalsGLSLES glsles
+{
+    source HardwareMorphAnimationWithNormalsVp.glsles
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+// Basic hardware morph animation (with normals)
+vertex_program Ogre/HardwareMorphAnimationWithNormalsGLSL glsl
+{
+    source HardwareMorphAnimationWithNormalsVp.glsl
+    syntax glsl150
+
+    includes_morph_animation true
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+vertex_program Ogre/HardwareMorphAnimationWithNormals unified
+{
+	delegate Ogre/HardwareMorphAnimationWithNormalsHLSL
+    delegate Ogre/HardwareMorphAnimationWithNormalsCg
+    delegate Ogre/HardwareMorphAnimationWithNormalsGLSL
+    delegate Ogre/HardwareMorphAnimationWithNormalsGLSLES
+}
+
+// Basic hardware pose animation supporting 2 active poses (with normals)
+vertex_program Ogre/HardwarePoseAnimationWithNormalsHLSL hlsl
+{
+    source Example_Basic4.hlsl
+    entry_point hardwarePoseAnimationWithNormals
+    target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (with normals)
+vertex_program Ogre/HardwarePoseAnimationWithNormalsCg cg
+{
+    source Example_Basic.cg
+    entry_point hardwarePoseAnimationWithNormals
+    profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (with normals)
+vertex_program Ogre/HardwarePoseAnimationWithNormalsGLSLES glsles
+{
+    source HardwarePoseAnimationWithNormalsVp.glsles
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+// Basic hardware pose animation supporting 2 active poses (with normals)
+vertex_program Ogre/HardwarePoseAnimationWithNormalsGLSL glsl
+{
+    source HardwarePoseAnimationWithNormalsVp.glsl
+    syntax glsl150
+
+    includes_pose_animation 2
+    default_params
+    {
+        param_named_auto worldViewProj worldviewproj_matrix
+        param_named_auto anim_t animation_parametric
+        param_named_auto objSpaceLightPos light_position_object_space 0
+        param_named_auto ambient ambient_light_colour
+    }
+}
+
+vertex_program Ogre/HardwarePoseAnimationWithNormals unified
+{
+	delegate Ogre/HardwarePoseAnimationWithNormalsHLSL
+    delegate Ogre/HardwarePoseAnimationWithNormalsCg
+    delegate Ogre/HardwarePoseAnimationWithNormalsGLSL
+    delegate Ogre/HardwarePoseAnimationWithNormalsGLSLES
+}
+
+material Examples/Flare
+{
+        technique
+        {
+                pass
+                {
+                        lighting off
+                        scene_blend add
+                        depth_write off
+
+                        texture_unit
+                        {
+                                texture flare.png
+                        }
+                }
+        }
+
+        technique
+        {
+                scheme glow
+                pass
+                {
+                        lighting off
+                        scene_blend add
+                        depth_write off
+
+                        texture_unit
+                        {
+                                texture flare.png
+                        }
+                }
+        }
+}

Modified: data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl
===================================================================
--- data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl	2018-11-11 15:45:00 UTC (rev 12095)
+++ data/branches/Shader_HS18/programs/Example/GLSL120/AmbientOneTexture.glsl	2018-11-11 16:37:35 UTC (rev 12096)
@@ -13,5 +13,5 @@
 void main()
 {
 	gl_Position = worldViewProj * position;
-	colour = ambient;
+	gl_FrontColor = ambient;
 }

Modified: data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl
===================================================================
--- data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl	2018-11-11 15:45:00 UTC (rev 12095)
+++ data/branches/Shader_HS18/programs/Example/GLSL120/skinningTwoWeightsVp.glsl	2018-11-11 16:37:35 UTC (rev 12096)
@@ -13,6 +13,7 @@
 uniform vec4 lightPos[2];
 uniform vec4 lightDiffuseColour[2];
 uniform vec4 ambient;
+uniform vec4 diffuse;
 
 void main()
 {

Modified: data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl
===================================================================
--- data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl	2018-11-11 15:45:00 UTC (rev 12095)
+++ data/branches/Shader_HS18/programs/OLD/skinningTwoWeightsVp.glsl	2018-11-11 16:37:35 UTC (rev 12096)
@@ -15,7 +15,7 @@
 {
 	vec3 blendPos = vec3(0,0,0);
 	vec3 blendNorm = vec3(0,0,0);
-	
+
 	for (int bone = 0; bone < 2; ++bone)
 	{
 		// perform matrix multiplication manually since no 3x4 matrices
@@ -29,10 +29,10 @@
 		worldMatrix[1] = worldMatrix3x4Array[idx + 1];
 		worldMatrix[2] = worldMatrix3x4Array[idx + 2];
 		worldMatrix[3] = vec4(0);
-		// now weight this into final 
+		// now weight this into final
 	    float weight = blendWeights[bone];
 		blendPos += (gl_Vertex * worldMatrix).xyz * weight;
-		
+
 		mat3 worldRotMatrix = mat3(worldMatrix[0].xyz, worldMatrix[1].xyz, worldMatrix[2].xyz);
 		blendNorm += (gl_Normal * worldRotMatrix) * weight;
 
@@ -46,12 +46,12 @@
 		lightPos[0].xyz -  (blendPos.xyz * lightPos[0].w));
 	vec3 lightDir1 = normalize(
 		lightPos[1].xyz -  (blendPos.xyz * lightPos[1].w));
-		
+
 	gl_FrontSecondaryColor = vec4(0);
-	gl_FrontColor = vec4(0.5, 0.5, 0.5, 1.0) 
+	gl_FrontColor = vec4(0.5, 0.5, 0.5, 1.0)
 		+ clamp(dot(lightDir0, blendNorm), 0.0, 1.0) * lightDiffuseColour[0]
 		+ clamp(dot(lightDir1, blendNorm), 0.0, 1.0) * lightDiffuseColour[1];
 
 	gl_TexCoord[0] = gl_MultiTexCoord0;
-	
+
 }

Modified: data/branches/Shader_HS18/resources.oxr
===================================================================
--- data/branches/Shader_HS18/resources.oxr	2018-11-11 15:45:00 UTC (rev 12095)
+++ data/branches/Shader_HS18/resources.oxr	2018-11-11 16:37:35 UTC (rev 12096)
@@ -12,10 +12,11 @@
     <ResourceLocation path = "images/textures/seamless"/>
     <ResourceLocation path = "images/textures/stellarobjects"/>
     <ResourceLocation path = "materials"        />
+    <ResourceLocation path = "materials/Example"        />
     <ResourceLocation path = "models"           />
     <ResourceLocation path = "packs/cubemap.zip" archiveType = "Zip"/>
     <ResourceLocation path = "packs/skybox.zip"  archiveType = "Zip"/>
-    
+
     <ResourceLocation path = "programs"         />
     <ResourceLocation path = "programs/GLSL"    />
     <ResourceLocation path = "programs/Example" />



More information about the Orxonox-commit mailing list