Browse Source

* Updated Particle.j3md so it works on pre GLSL 1.2 graphics cards

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7229 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
sha..rd 14 years ago
parent
commit
3b9cf4cd35

+ 0 - 4
engine/src/core-data/Common/MatDefs/Misc/Particle.frag

@@ -1,7 +1,3 @@
-// TODO: Fix this so normal particles don't need it.
-// Only needed for certain GPUs.
-//#version 120
-
 #ifdef USE_TEXTURE
 uniform sampler2D m_Texture;
 varying vec4 texCoord;

+ 22 - 0
engine/src/core-data/Common/MatDefs/Misc/Particle.j3md

@@ -36,6 +36,28 @@ MaterialDef Point Sprite {
         }
     }
 
+    Technique {
+
+        VertexShader   GLSL100 : Common/MatDefs/Misc/Particle.vert
+        FragmentShader GLSL100 : Common/MatDefs/Misc/Particle.frag
+
+        WorldParameters {
+            WorldViewProjectionMatrix
+            WorldViewMatrix
+            WorldMatrix
+            CameraPosition
+        }
+
+        RenderState {
+            Blend AlphaAdditive
+            DepthWrite Off
+        }
+
+        Defines {
+            USE_TEXTURE : Texture
+        }
+    }
+
     Technique FixedFunc {
         RenderState {
             Blend AlphaAdditive