|
From: Tapio V. <aa...@us...> - 2011-01-28 06:51:01
|
Module: performous
Branch: opengl2
Commit: 086c18b373b01a42ed5c99700118c9052c02f2b5
Author: Tapio Vierros <tap...@gm...>
Date: Fri Jan 28 08:49:16 2011 +0200
Hot fix dance shader by adding the cruft that's in the other shaders.
---
themes/default/shaders/dancenote.frag | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/themes/default/shaders/dancenote.frag b/themes/default/shaders/dancenote.frag
index cd10132..8be9c5c 100644
--- a/themes/default/shaders/dancenote.frag
+++ b/themes/default/shaders/dancenote.frag
@@ -1,5 +1,8 @@
-uniform sampler2D tex;
+#extension GL_ARB_texture_rectangle : enable
+uniform int texMode;
+uniform sampler2D tex;
+uniform sampler2DRect texRect;
uniform int noteType;
uniform float hitAnim;
uniform float clock;
@@ -17,7 +20,17 @@ void colorGlow(inout vec4 c) {
void main()
{
- vec4 texel = texture2D(tex, gl_TexCoord[0].st).rgba;
+ vec4 texel;
+
+ if (texMode == 1) {
+ texel = texture2D(tex, gl_TexCoord[0].st).rgba;
+ } else if (texMode == 2) {
+ texel = texture2DRect(texRect, gl_TexCoord[0].st).rgba;
+ } else if (texMode == 0) {
+ texel = vec4(1.0, 1.0, 1.0, 1.0);
+ } else {
+ texel = vec4(1.0, 0.0, 1.0, 1.0); // Magenta to highlight
+ }
// Cursor arrows
if (noteType == 0) {
|