Revision: 843
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=843&view=rev
Author: andy_miller
Date: 2009-01-24 03:44:38 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
Sync media to the 1.6.1 SDK
Modified Paths:
--------------
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_vs.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/notex_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/vs.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/Ambient_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/GlobalLight_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/LightMaterial_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/LightMaterial_vs.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowColour_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowDS_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/ShowNormal_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/SinglePass_ps.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/glsl/vs.glsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/Ambient_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/GlobalLight_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/LightMaterial_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/LightMaterial_vs.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowColour_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowDS_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/ShowNormal_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/SinglePass_ps.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/post/hlsl/vs.hlsl
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.compositor
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.glsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.hlsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_ambient.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_ambient.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.glsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.hlsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_debug.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.glsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.hlsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_minilight.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.glsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.hlsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_multipass.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.glsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.hlsl.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_onepass.material
trunk/python-ogre/demos/media/DeferredShadingMedia/deferred_post_vs.program
trunk/python-ogre/demos/media/DeferredShadingMedia/deferreddemo.material
trunk/python-ogre/demos/media/PCZAppMedia/room.material
trunk/python-ogre/demos/media/PCZAppMedia/terrain2.cfg
trunk/python-ogre/demos/media/fonts/read_me.html
trunk/python-ogre/demos/media/fonts/sample.fontdef
trunk/python-ogre/demos/media/gui/CompositorDemo.layout
trunk/python-ogre/demos/media/gui/CompositorDemoCegui.config
trunk/python-ogre/demos/media/gui/CrowdDemo.layout
trunk/python-ogre/demos/media/gui/Falagard.xsd
trunk/python-ogre/demos/media/gui/Font.xsd
trunk/python-ogre/demos/media/gui/GUILayout.xsd
trunk/python-ogre/demos/media/gui/GUIScheme.xsd
trunk/python-ogre/demos/media/gui/Imageset.xsd
trunk/python-ogre/demos/media/gui/InstancingDemo.layout
trunk/python-ogre/demos/media/gui/OceanDemoCegui.config
trunk/python-ogre/demos/media/gui/OceanDemoLayout.xml
trunk/python-ogre/demos/media/gui/TaharezLook.imageset
trunk/python-ogre/demos/media/gui/TaharezLook.looknfeel
trunk/python-ogre/demos/media/gui/TaharezLookSkin.scheme
trunk/python-ogre/demos/media/gui/TaharezLookWidgetAliases.scheme
trunk/python-ogre/demos/media/gui/bluehighway-10.font
trunk/python-ogre/demos/media/gui/bluehighway-12.font
trunk/python-ogre/demos/media/gui/bluehighway-8.font
trunk/python-ogre/demos/media/gui/cegui8.layout
trunk/python-ogre/demos/media/gui/facial.layout
trunk/python-ogre/demos/media/gui/ogregui.layout
trunk/python-ogre/demos/media/gui/shadows.layout
trunk/python-ogre/demos/media/materials/programs/ASCIIFP.cg
trunk/python-ogre/demos/media/materials/programs/AmbientOneTexture.glsl
trunk/python-ogre/demos/media/materials/programs/Bloom2_ps20.glsl
trunk/python-ogre/demos/media/materials/programs/Bloom2_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Bloom_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Bloom_vs11.hlsl
trunk/python-ogre/demos/media/materials/programs/Blur0_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Blur0_vs.glsl
trunk/python-ogre/demos/media/materials/programs/Blur0_vs11.hlsl
trunk/python-ogre/demos/media/materials/programs/Blur1_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Blur1_vs.glsl
trunk/python-ogre/demos/media/materials/programs/Blur1_vs11.hlsl
trunk/python-ogre/demos/media/materials/programs/BlurH_ps20.glsl
trunk/python-ogre/demos/media/materials/programs/BlurH_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/BlurV_ps20.glsl
trunk/python-ogre/demos/media/materials/programs/BlurV_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Blur_ps.glsl
trunk/python-ogre/demos/media/materials/programs/Blur_vs.glsl
trunk/python-ogre/demos/media/materials/programs/Blur_vs11.hlsl
trunk/python-ogre/demos/media/materials/programs/BrightBloom2_ps20.glsl
trunk/python-ogre/demos/media/materials/programs/BrightBloom2_ps20.hlsl
trunk/python-ogre/demos/media/materials/programs/Combine_fp.cg
trunk/python-ogre/demos/media/materials/programs/Common.cg
trunk/python-ogre/demos/media/materials/programs/DOF_ps.cg
trunk/python-ogre/demos/media/materials/programs/DepthShadowmap.hlsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapCasterFp.glsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapCasterVp.glsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapNormalMapReceiverFp.glsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapNormalMapReceiverVp.glsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapReceiverFp.glsl
trunk/python-ogre/demos/media/materials/programs/DepthShadowmapReceiverVp.glsl
trunk/python-ogre/demos/media/materials/programs/DitherFP.cg
trunk/python-ogre/demos/media/materials/programs/Example_Basic.cg
trunk/python-ogre/demos/media/materials/programs/Example_Basic.hlsl
trunk/python-ogre/demos/media/materials/programs/Example_BumpMapping.cg
trunk/python-ogre/demos/media/materials/programs/Example_CelShading.cg
trunk/python-ogre/demos/media/materials/programs/Example_Fresnel.cg
trunk/python-ogre/demos/media/materials/programs/Example_FresnelPS.asm
trunk/python-ogre/demos/media/materials/programs/Example_Projection.cg
trunk/python-ogre/demos/media/materials/programs/GlassFP.cg
trunk/python-ogre/demos/media/materials/programs/Grass.cg
trunk/python-ogre/demos/media/materials/programs/GrayScale.cg
trunk/python-ogre/demos/media/materials/programs/HalftoneFP.cg
trunk/python-ogre/demos/media/materials/programs/HeatVision.cg
trunk/python-ogre/demos/media/materials/programs/InvertFP.cg
trunk/python-ogre/demos/media/materials/programs/LaplaceFP.cg
trunk/python-ogre/demos/media/materials/programs/NightVisionFP.cg
trunk/python-ogre/demos/media/materials/programs/Ocean2GLSL.frag
trunk/python-ogre/demos/media/materials/programs/Ocean2GLSL.vert
trunk/python-ogre/demos/media/materials/programs/Ocean2HLSL_Cg.frag
trunk/python-ogre/demos/media/materials/programs/Ocean2HLSL_Cg.vert
trunk/python-ogre/demos/media/materials/programs/OffsetMapping.cg
trunk/python-ogre/demos/media/materials/programs/OffsetMapping.hlsl
trunk/python-ogre/demos/media/materials/programs/OffsetMappingFp.glsl
trunk/python-ogre/demos/media/materials/programs/OffsetMappingVp.glsl
trunk/python-ogre/demos/media/materials/programs/OffsetMapping_specular.asm
trunk/python-ogre/demos/media/materials/programs/OldMovieFP.cg
trunk/python-ogre/demos/media/materials/programs/OldTV.cg
trunk/python-ogre/demos/media/materials/programs/ParticleGS.cg
trunk/python-ogre/demos/media/materials/programs/PassthroughVP.glsl
trunk/python-ogre/demos/media/materials/programs/PosterizeFP.cg
trunk/python-ogre/demos/media/materials/programs/Radial_Blur_FP.cg
trunk/python-ogre/demos/media/materials/programs/SharpenEdgesFP.cg
trunk/python-ogre/demos/media/materials/programs/StdQuad_vp.cg
trunk/python-ogre/demos/media/materials/programs/StdQuad_vp.glsl
trunk/python-ogre/demos/media/materials/programs/Swizzle.gp
trunk/python-ogre/demos/media/materials/programs/SwizzleGP.cg
trunk/python-ogre/demos/media/materials/programs/SwizzleGP.glsl
trunk/python-ogre/demos/media/materials/programs/TilingFP.cg
trunk/python-ogre/demos/media/materials/programs/crowdVp.glsl
trunk/python-ogre/demos/media/materials/programs/hdr.cg
trunk/python-ogre/demos/media/materials/programs/hdr.hlsl
trunk/python-ogre/demos/media/materials/programs/hdr_bloom.glsl
trunk/python-ogre/demos/media/materials/programs/hdr_downscale2x2luminence.glsl
trunk/python-ogre/demos/media/materials/programs/hdr_downscale3x3.glsl
trunk/python-ogre/demos/media/materials/programs/hdr_downscale3x3brightpass.glsl
trunk/python-ogre/demos/media/materials/programs/hdr_finalToneMapping.glsl
trunk/python-ogre/demos/media/materials/programs/hdr_tonemap_util.glsl
trunk/python-ogre/demos/media/materials/programs/hdrutils.hlsl
trunk/python-ogre/demos/media/materials/programs/instancing.cg
trunk/python-ogre/demos/media/materials/programs/instancingVp.glsl
trunk/python-ogre/demos/media/materials/programs/isosurf.cg
trunk/python-ogre/demos/media/materials/programs/mrttestfp.hlsl
trunk/python-ogre/demos/media/materials/programs/mrttestfp_quad.glsl
trunk/python-ogre/demos/media/materials/programs/mrttestfp_scene.glsl
trunk/python-ogre/demos/media/materials/programs/oceanGLSL.frag
trunk/python-ogre/demos/media/materials/programs/oceanGLSL.vert
trunk/python-ogre/demos/media/materials/programs/oceanHLSL_Cg.frag
trunk/python-ogre/demos/media/materials/programs/oceanHLSL_Cg.vert
trunk/python-ogre/demos/media/materials/programs/pssm.cg
trunk/python-ogre/demos/media/materials/programs/skinningTwoWeightsShadowCasterVp.glsl
trunk/python-ogre/demos/media/materials/programs/skinningTwoWeightsVp.glsl
trunk/python-ogre/demos/media/materials/programs/varianceshadowcasterfp.cg
trunk/python-ogre/demos/media/materials/programs/varianceshadowcastervp.cg
trunk/python-ogre/demos/media/materials/programs/varianceshadowreceiverfp.cg
trunk/python-ogre/demos/media/materials/programs/varianceshadowreceivervp.cg
trunk/python-ogre/demos/media/overlays/BasicOgreGuiTemplates.inc
trunk/python-ogre/demos/media/overlays/Compositor.overlay
trunk/python-ogre/demos/media/overlays/DP3.overlay
trunk/python-ogre/demos/media/overlays/Example-CubeMapping.overlay
trunk/python-ogre/demos/media/overlays/Example-DynTex.overlay
trunk/python-ogre/demos/media/overlays/Example-Water.overlay
trunk/python-ogre/demos/media/overlays/Shadows.overlay
trunk/python-ogre/demos/media/packs/chiropteraDM.txt
trunk/python-ogre/demos/media/particle/Example-Water.particle
trunk/python-ogre/demos/media/particle/Example.particle
trunk/python-ogre/demos/media/particle/emitted_emitter.particle
trunk/python-ogre/demos/media/particle/smoke.particle
trunk/python-ogre/demos/media/terrain.cfg
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_notex_ps.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,46 +1,46 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Single colour normal mapped
-*/
-
-varying vec3 normal;
-varying vec3 tangent_;
-varying vec3 binormal;
-
-varying vec2 texCoord0;
-varying float depth;
-
-uniform sampler2D normTex;
-uniform float specularity;
-uniform vec3 colour;
-void main()
-{
- // Frame for normal mapping
- mat3 rotation = mat3(tangent_, binormal, normal);
- vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
-
- gl_FragData[0].rgb = colour;
- gl_FragData[0].a = specularity;
- // rotation*texnormal is reversed for GL because matrices are stored transposed internally
- // compared to HLSL
- gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
- gl_FragData[1].w = depth;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Single colour normal mapped
+*/
+
+varying vec3 normal;
+varying vec3 tangent_;
+varying vec3 binormal;
+
+varying vec2 texCoord0;
+varying float depth;
+
+uniform sampler2D normTex;
+uniform float specularity;
+uniform vec3 colour;
+void main()
+{
+ // Frame for normal mapping
+ mat3 rotation = mat3(tangent_, binormal, normal);
+ vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
+
+ gl_FragData[0].rgb = colour;
+ gl_FragData[0].a = specularity;
+ // rotation*texnormal is reversed for GL because matrices are stored transposed internally
+ // compared to HLSL
+ gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
+ gl_FragData[1].w = depth;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_ps.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,44 +1,44 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Textured normal mapped
-*/
-
-varying vec3 normal;
-varying vec3 tangent_;
-varying vec3 binormal;
-varying vec2 texCoord0;
-varying float depth;
-uniform sampler2D tex0;
-uniform sampler2D normTex;
-uniform float specularity;
-void main()
-{
- // Frame for normal mapping
- mat3 rotation = mat3(tangent_, binormal, normal);
- vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
-
- gl_FragData[0].rgb = vec3(texture2D(tex0, texCoord0));
- gl_FragData[0].a = specularity;
- // rotation*texnormal is reversed for GL because matrices are stored transposed internally
- // compared to HLSL
- gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
- gl_FragData[1].w = depth;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Textured normal mapped
+*/
+
+varying vec3 normal;
+varying vec3 tangent_;
+varying vec3 binormal;
+varying vec2 texCoord0;
+varying float depth;
+uniform sampler2D tex0;
+uniform sampler2D normTex;
+uniform float specularity;
+void main()
+{
+ // Frame for normal mapping
+ mat3 rotation = mat3(tangent_, binormal, normal);
+ vec3 texnormal = (vec3(texture2D(normTex, texCoord0))-0.5)*2.0;
+
+ gl_FragData[0].rgb = vec3(texture2D(tex0, texCoord0));
+ gl_FragData[0].a = specularity;
+ // rotation*texnormal is reversed for GL because matrices are stored transposed internally
+ // compared to HLSL
+ gl_FragData[1].xyz = normalize(rotation*texnormal); // Do normalisation here, saves an operation per light
+ gl_FragData[1].w = depth;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/nm_vs.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,41 +1,41 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Normal mapped
-*/
-varying vec3 normal;
-varying vec3 tangent_;
-varying vec3 binormal;
-varying vec2 texCoord0;
-varying float depth;
-attribute vec3 tangent;
-void main()
-{
- vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
-
- gl_Position = projPos;
- depth = projPos.w;
- texCoord0 = vec2(gl_MultiTexCoord0);
-
- normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
- tangent_ = vec3(gl_ModelViewMatrix*vec4(tangent,0));
- binormal = cross(normal, tangent_);
-
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Normal mapped
+*/
+varying vec3 normal;
+varying vec3 tangent_;
+varying vec3 binormal;
+varying vec2 texCoord0;
+varying float depth;
+attribute vec3 tangent;
+void main()
+{
+ vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+ gl_Position = projPos;
+ depth = projPos.w;
+ texCoord0 = vec2(gl_MultiTexCoord0);
+
+ normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
+ tangent_ = vec3(gl_ModelViewMatrix*vec4(tangent,0));
+ binormal = cross(normal, tangent_);
+
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/notex_ps.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,35 +1,35 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Single colour phong
-*/
-
-varying vec3 normal;
-varying vec2 texCoord0;
-varying float depth;
-uniform float specularity;
-uniform vec3 colour;
-void main()
-{
- gl_FragData[0].rgb = colour;
- gl_FragData[0].a = specularity;
- gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
- gl_FragData[1].w = depth;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Single colour phong
+*/
+
+varying vec3 normal;
+varying vec2 texCoord0;
+varying float depth;
+uniform float specularity;
+uniform vec3 colour;
+void main()
+{
+ gl_FragData[0].rgb = colour;
+ gl_FragData[0].a = specularity;
+ gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
+ gl_FragData[1].w = depth;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/ps.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,37 +1,37 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Textured phongs
-*/
-
-varying vec3 normal;
-varying vec2 texCoord0;
-varying float depth;
-
-uniform sampler2D Tex0;
-uniform float specularity;
-
-void main()
-{
- gl_FragData[0].rgb = vec3(texture2D(Tex0, texCoord0));
- gl_FragData[0].a = specularity;
- gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
- gl_FragData[1].w = depth;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Textured phongs
+*/
+
+varying vec3 normal;
+varying vec2 texCoord0;
+varying float depth;
+
+uniform sampler2D Tex0;
+uniform float specularity;
+
+void main()
+{
+ gl_FragData[0].rgb = vec3(texture2D(Tex0, texCoord0));
+ gl_FragData[0].a = specularity;
+ gl_FragData[1].xyz = normalize(normal); // Do normalisation here, saves an operation per light
+ gl_FragData[1].w = depth;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/glsl/vs.glsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,39 +1,39 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Phong material vertex shader
-*/
-varying vec3 normal;
-varying vec2 texCoord0;
-varying float depth;
-
-void main()
-{
- vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
-
- gl_Position = projPos;
- depth = projPos.w;
- texCoord0 = vec2(gl_MultiTexCoord0);
-
- normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Phong material vertex shader
+*/
+varying vec3 normal;
+varying vec2 texCoord0;
+varying float depth;
+
+void main()
+{
+ vec4 projPos = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+ gl_Position = projPos;
+ depth = projPos.w;
+ texCoord0 = vec2(gl_MultiTexCoord0);
+
+ normal = vec3(gl_ModelViewMatrix*vec4(gl_Normal,0));
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_notex_ps.hlsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,56 +1,56 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Single colour normal mapped
-*/
-sampler Tex0: register(s0);
-
-struct OUTPUT
-{
- float4 color0 : COLOR0; // Diffuse color + ?
- float4 color1 : COLOR1; // Normal + depth
-};
-
-float3 colour;
-float specularity;
-
-OUTPUT main(
- float3 normal: TEXCOORD0,
- float4 texCoord0: TEXCOORD1,
- float depth: TEXCOORD2,
- float3 tangent: TEXCOORD3,
- float3 binormal: TEXCOORD4
-)
-{
- OUTPUT output;
- // Frame for normal mapping
- float3x3 rotation = float3x3(tangent, binormal, normal);
- float3 texnormal = (tex2D(Tex0, texCoord0)-0.5)*2;
-
- output.color0.rgb = colour;
- output.color0.a = specularity;
- output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
- output.color1.w = depth;
-
- return output;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Single colour normal mapped
+*/
+sampler Tex0: register(s0);
+
+struct OUTPUT
+{
+ float4 color0 : COLOR0; // Diffuse color + ?
+ float4 color1 : COLOR1; // Normal + depth
+};
+
+float3 colour;
+float specularity;
+
+OUTPUT main(
+ float3 normal: TEXCOORD0,
+ float4 texCoord0: TEXCOORD1,
+ float depth: TEXCOORD2,
+ float3 tangent: TEXCOORD3,
+ float3 binormal: TEXCOORD4
+)
+{
+ OUTPUT output;
+ // Frame for normal mapping
+ float3x3 rotation = float3x3(tangent, binormal, normal);
+ float3 texnormal = (tex2D(Tex0, texCoord0)-0.5)*2;
+
+ output.color0.rgb = colour;
+ output.color0.a = specularity;
+ output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
+ output.color1.w = depth;
+
+ return output;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_ps.hlsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_ps.hlsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_ps.hlsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,56 +1,56 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Textured normal mapped
-*/
-sampler Tex0: register(s0);
-sampler Tex1: register(s1);
-
-struct OUTPUT
-{
- float4 color0 : COLOR0; // Diffuse color + ?
- float4 color1 : COLOR1; // Normal + depth
-};
-
-float specularity;
-
-OUTPUT main(
- float3 normal: TEXCOORD0,
- float4 texCoord0: TEXCOORD1,
- float depth: TEXCOORD2,
- float3 tangent: TEXCOORD3,
- float3 binormal: TEXCOORD4
-)
-{
- OUTPUT output;
- // Frame for normal mapping
- float3x3 rotation = float3x3(tangent, binormal, normal);
- float3 texnormal = (tex2D(Tex1, texCoord0)-0.5)*2;
-
- output.color0.rgb = tex2D(Tex0, texCoord0);
- output.color0.a = specularity;
- output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
- output.color1.w = depth;
-
- return output;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Textured normal mapped
+*/
+sampler Tex0: register(s0);
+sampler Tex1: register(s1);
+
+struct OUTPUT
+{
+ float4 color0 : COLOR0; // Diffuse color + ?
+ float4 color1 : COLOR1; // Normal + depth
+};
+
+float specularity;
+
+OUTPUT main(
+ float3 normal: TEXCOORD0,
+ float4 texCoord0: TEXCOORD1,
+ float depth: TEXCOORD2,
+ float3 tangent: TEXCOORD3,
+ float3 binormal: TEXCOORD4
+)
+{
+ OUTPUT output;
+ // Frame for normal mapping
+ float3x3 rotation = float3x3(tangent, binormal, normal);
+ float3 texnormal = (tex2D(Tex1, texCoord0)-0.5)*2;
+
+ output.color0.rgb = tex2D(Tex0, texCoord0);
+ output.color0.a = specularity;
+ output.color1.xyz = normalize(mul(texnormal,rotation)); // Do normalisation here, saves an operation per light
+ output.color1.w = depth;
+
+ return output;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_vs.hlsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_vs.hlsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/nm_vs.hlsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,56 +1,56 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Normal mapped
-*/
-struct VS_OUTPUT
-{
- float4 pos: POSITION;
- float4 normal: TEXCOORD0;
- float2 texCoord0: TEXCOORD1;
- float depth: TEXCOORD2;
- float3 tangent: TEXCOORD3;
- float3 binormal: TEXCOORD4;
-};
-float4x4 worldViewProj;
-float4x4 world;
-float4x4 worldView;
-VS_OUTPUT main(
- float4 Pos: POSITION,
- float3 normal: NORMAL,
- float2 texCoord0: TEXCOORD0,
- float3 tangent: TANGENT0
-)
-{
- VS_OUTPUT Out;
-
- Out.normal = mul(worldView, normal);
- float4 projPos = mul(worldViewProj, Pos);
-
- Out.tangent = mul(worldView, tangent);
- Out.binormal = cross(Out.normal, Out.tangent);
-
- Out.pos = projPos;
- Out.texCoord0 = texCoord0;
- Out.depth = projPos.w;
- //Out.depth = projPos.z/projPos.w;
- return Out;
-}
-
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Normal mapped
+*/
+struct VS_OUTPUT
+{
+ float4 pos: POSITION;
+ float4 normal: TEXCOORD0;
+ float2 texCoord0: TEXCOORD1;
+ float depth: TEXCOORD2;
+ float3 tangent: TEXCOORD3;
+ float3 binormal: TEXCOORD4;
+};
+float4x4 worldViewProj;
+float4x4 world;
+float4x4 worldView;
+VS_OUTPUT main(
+ float4 Pos: POSITION,
+ float3 normal: NORMAL,
+ float2 texCoord0: TEXCOORD0,
+ float3 tangent: TANGENT0
+)
+{
+ VS_OUTPUT Out;
+
+ Out.normal = mul(worldView, normal);
+ float4 projPos = mul(worldViewProj, Pos);
+
+ Out.tangent = mul(worldView, tangent);
+ Out.binormal = cross(Out.normal, Out.tangent);
+
+ Out.pos = projPos;
+ Out.texCoord0 = texCoord0;
+ Out.depth = projPos.w;
+ //Out.depth = projPos.z/projPos.w;
+ return Out;
+}
+
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/notex_ps.hlsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/notex_ps.hlsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/notex_ps.hlsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,47 +1,47 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Single colour phong
-*/
-struct OUTPUT
-{
- float4 color0 : COLOR0; // Diffuse color
- float4 color1 : COLOR1; // Position
-};
-
-float3 colour;
-float specularity;
-
-OUTPUT main(
- float4 normal: TEXCOORD0,
- float4 texCoord0: TEXCOORD1,
- float depth: TEXCOORD2
-)
-{
- OUTPUT output;
- output.color0.rgb = colour;
- output.color0.a = specularity;
- output.color1.xyz = normal;
- output.color1.w = depth;
- return output;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+******************************************************************************/
+/** Deferred shading framework
+ // W.J. :wumpus: van der Laan 2005 //
+
+ Material shader: Single colour phong
+*/
+struct OUTPUT
+{
+ float4 color0 : COLOR0; // Diffuse color
+ float4 color1 : COLOR1; // Position
+};
+
+float3 colour;
+float specularity;
+
+OUTPUT main(
+ float4 normal: TEXCOORD0,
+ float4 texCoord0: TEXCOORD1,
+ float depth: TEXCOORD2
+)
+{
+ OUTPUT output;
+ output.color0.rgb = colour;
+ output.color0.a = specularity;
+ output.color1.xyz = normal;
+ output.color1.w = depth;
+ return output;
+}
Modified: trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/ps.hlsl
===================================================================
--- trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/ps.hlsl 2009-01-24 03:17:30 UTC (rev 842)
+++ trunk/python-ogre/demos/media/DeferredShadingMedia/DeferredShading/material/hlsl/ps.hlsl 2009-01-24 03:44:38 UTC (rev 843)
@@ -1,48 +1,48 @@
-/******************************************************************************
-Copyright (c) W.J. van der Laan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
-Software, and to permit persons to whom the Software is furnished to do so, subject
-to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies
-or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-******************************************************************************/
-/** Deferred shading framework
- // W.J. :wumpus: van der Laan 2005 //
-
- Material shader: Textured phongs
-*/
-sampler Tex0: register(s0);
-
-struct OUTPUT
-{
- float4 color0 : COLOR0; // Diffuse color
- float4 color1 : COLOR1; // Position
-};
-
-float specularity;
-
-OUTPUT main(
- float4 normal: TEXCOORD0,
- float4 texCoord0: TEXCOORD1,
- float depth: TEXCOORD2
-)
-{
- OUTPUT output;
- output.color0.rgb = tex2D(Tex0, texCoord0);
- output.color0.a = specularity;
- output.color1.xyz = normalize(normal); // Do normalisation here, saves an operation per light
- output.color1.w = depth;
- return output;
-}
+/******************************************************************************
+Copyright (c) W.J. van der Laan
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
+Software, and to permit persons to whom the Software is furnished to do so, subject
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OU...
[truncated message content] |