]> git.tdb.fi Git - libs/gl.git/blobdiff - demos/desertpillars/data/flare.glsl
Add a moving point light to the night phase of desertpillars
[libs/gl.git] / demos / desertpillars / data / flare.glsl
diff --git a/demos/desertpillars/data/flare.glsl b/demos/desertpillars/data/flare.glsl
new file mode 100644 (file)
index 0000000..dd28758
--- /dev/null
@@ -0,0 +1,12 @@
+import billboard;
+
+uniform Flare
+{
+       int flare_light_index;
+};
+
+#pragma MSP stage(fragment)
+vec4 get_color() override
+{
+       return texture(color_tex, texcoord.xy)*vec4(light_sources[flare_light_index].color, 1.0);
+}