aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core-data/Common/MatDefs/Light/Glow.frag
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/core-data/Common/MatDefs/Light/Glow.frag')
-rw-r--r--engine/src/core-data/Common/MatDefs/Light/Glow.frag32
1 files changed, 32 insertions, 0 deletions
diff --git a/engine/src/core-data/Common/MatDefs/Light/Glow.frag b/engine/src/core-data/Common/MatDefs/Light/Glow.frag
new file mode 100644
index 0000000..a18a228
--- /dev/null
+++ b/engine/src/core-data/Common/MatDefs/Light/Glow.frag
@@ -0,0 +1,32 @@
+
+#if defined(NEED_TEXCOORD1)
+ varying vec2 texCoord1;
+#else
+ varying vec2 texCoord;
+#endif
+
+
+#ifdef HAS_GLOWMAP
+ uniform sampler2D m_GlowMap;
+#endif
+
+#ifdef HAS_GLOWCOLOR
+ uniform vec4 m_GlowColor;
+#endif
+
+
+void main(){
+ #ifdef HAS_GLOWMAP
+ #if defined(NEED_TEXCOORD1)
+ gl_FragColor = texture2D(m_GlowMap, texCoord1);
+ #else
+ gl_FragColor = texture2D(m_GlowMap, texCoord);
+ #endif
+ #else
+ #ifdef HAS_GLOWCOLOR
+ gl_FragColor = m_GlowColor;
+ #else
+ gl_FragColor = vec4(0.0);
+ #endif
+ #endif
+} \ No newline at end of file