1MaterialDef Point Sprite { 2 3 MaterialParameters { 4 Texture2D Texture 5 Float Quadratic 6 Boolean PointSprite 7 8 //only used for soft particles 9 Texture2D DepthTexture 10 Float Softness 11 12 // Texture of the glowing parts of the material 13 Texture2D GlowMap 14 // The glow color of the object 15 Color GlowColor 16 } 17 18 Technique { 19 20 VertexShader GLSL100 : Common/MatDefs/Misc/Particle.vert 21 FragmentShader GLSL120 : Common/MatDefs/Misc/Particle.frag 22 23 WorldParameters { 24 WorldViewProjectionMatrix 25 WorldViewMatrix 26 WorldMatrix 27 CameraPosition 28 } 29 30 RenderState { 31 Blend AlphaAdditive 32 DepthWrite Off 33 PointSprite On 34 // AlphaTestFalloff 0.01 35 } 36 37 Defines { 38 USE_TEXTURE : Texture 39 POINT_SPRITE : PointSprite 40 } 41 } 42 43 Technique { 44 45 VertexShader GLSL100 : Common/MatDefs/Misc/Particle.vert 46 FragmentShader GLSL100 : Common/MatDefs/Misc/Particle.frag 47 48 WorldParameters { 49 WorldViewProjectionMatrix 50 WorldViewMatrix 51 WorldMatrix 52 CameraPosition 53 } 54 55 RenderState { 56 Blend AlphaAdditive 57 DepthWrite Off 58 } 59 60 Defines { 61 USE_TEXTURE : Texture 62 } 63 } 64 65 Technique SoftParticles{ 66 67 VertexShader GLSL100 : Common/MatDefs/Misc/SoftParticle.vert 68 FragmentShader GLSL100 : Common/MatDefs/Misc/SoftParticle.frag 69 70 WorldParameters { 71 WorldViewProjectionMatrix 72 WorldViewMatrix 73 WorldMatrix 74 CameraPosition 75 } 76 77 RenderState { 78 Blend AlphaAdditive 79 DepthWrite Off 80 } 81 82 Defines { 83 USE_TEXTURE : Texture 84 } 85 } 86 87 Technique FixedFunc { 88 RenderState { 89 Blend AlphaAdditive 90 // DepthWrite Off 91 // AlphaTestFalloff 0.01 92 } 93 } 94 95 Technique Glow { 96 97 VertexShader GLSL100: Common/MatDefs/Misc/SimpleTextured.vert 98 FragmentShader GLSL100: Common/MatDefs/Light/Glow.frag 99 100 WorldParameters { 101 WorldViewProjectionMatrix 102 } 103 104 Defines { 105 HAS_GLOWMAP : GlowMap 106 HAS_GLOWCOLOR : GlowColor 107 } 108 109 RenderState { 110 PointSprite On 111 Blend AlphaAdditive 112 DepthWrite Off 113 } 114 } 115}