Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make GLSL use #version 120 consistently.
This removes gl_VertexID, since it didn't seem to work with #version 120. See ticket:4536, maybe fixes.
- Loading branch information
Showing
16 changed files
with
75 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 120 | ||
#pragma debug(on) | ||
//#pragma debug(on) | ||
|
||
uniform sampler2D Texture; | ||
uniform sampler2D TextureTcmask; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 120 | ||
#pragma debug(on) | ||
//#pragma debug(on) | ||
|
||
uniform mat4 ModelViewProjectionMatrix; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#version 130 | ||
#version 120 | ||
|
||
in vec4 color; | ||
varying vec4 color; | ||
|
||
out vec4 FragColor; | ||
|
||
void main() | ||
{ | ||
FragColor = color; | ||
gl_FragColor = color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
#version 130 | ||
#version 120 | ||
|
||
uniform vec2 from; | ||
uniform vec2 to; | ||
uniform mat4 ModelViewProjectionMatrix; | ||
|
||
vec4 getPos(int id) | ||
{ | ||
if (id == 0) return vec4(from, 0., 1.); | ||
if (id == 1) return vec4(to, 0., 1.); | ||
} | ||
attribute vec4 rect; | ||
|
||
|
||
void main() | ||
{ | ||
gl_Position = ModelViewProjectionMatrix * getPos(gl_VertexID); | ||
vec4 pos = vec4(from + (to - from)*rect.y, 0.0, 1.0); | ||
gl_Position = ModelViewProjectionMatrix * pos; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 120 | ||
#pragma debug(on) | ||
//#pragma debug(on) | ||
|
||
uniform sampler2D Texture; | ||
uniform vec4 colour; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 120 | ||
#pragma debug(on) | ||
//#pragma debug(on) | ||
|
||
uniform mat4 ModelViewProjectionMatrix; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#version 130 | ||
#version 120 | ||
|
||
uniform vec4 color = vec4(1.); | ||
|
||
out vec4 FragColor; | ||
|
||
void main() | ||
{ | ||
FragColor = color; | ||
gl_FragColor = color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 120 | ||
#pragma debug(on) | ||
//#pragma debug(on) | ||
|
||
uniform float stretch; | ||
uniform mat4 ModelViewMatrix; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
#version 130 | ||
#version 120 | ||
|
||
uniform vec4 color = vec4(1.); | ||
uniform sampler2D texture; | ||
|
||
in vec2 uv; | ||
out vec4 FragColor; | ||
out vec4 FragColor1; | ||
varying vec2 uv; | ||
|
||
void main() | ||
{ | ||
vec4 texColour = texture2D(texture, uv) * color.a; | ||
FragColor = texColour * color; | ||
FragColor1 = texColour; | ||
gl_FragData[0] = texColour * color; | ||
gl_FragData[1] = texColour; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
#version 130 | ||
#version 120 | ||
|
||
uniform vec4 color = vec4(1.); | ||
uniform sampler2D texture; | ||
|
||
in vec2 uv; | ||
out vec4 FragColor; | ||
varying vec2 uv; | ||
|
||
void main() | ||
{ | ||
FragColor = texture2D(texture, uv) * color; | ||
gl_FragColor = texture2D(texture, uv) * color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters