mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-27 06:29:19 +00:00
Disambiguate texture name from texture() function in basic fragment shader
This commit is contained in:
parent
0aacdfa9e5
commit
33160be9ac
@ -21,7 +21,7 @@ varying vec2 varTexcoord;
|
||||
// global alpha value
|
||||
uniform float aValue;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D aTexture;
|
||||
|
||||
#if __VERSION__ >= 140
|
||||
#define OUTPUT_TEXTURE(TEX) vec4 tex = texture(TEX, varTexcoord.st, 0.0); fragColor = vec4(tex.r, tex.g, tex.b, tex.a*aValue)
|
||||
@ -31,5 +31,5 @@ uniform sampler2D texture;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
OUTPUT_TEXTURE(texture);
|
||||
OUTPUT_TEXTURE(aTexture);
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ static GLuint _build_program(demoSource *vertexSource, demoSource *fragmentSourc
|
||||
// Setup common program input points //
|
||||
///////////////////////////////////////
|
||||
|
||||
texSamplerLoc = glGetUniformLocation(prgName, "texture");
|
||||
texSamplerLoc = glGetUniformLocation(prgName, "aTexture");
|
||||
if (texSamplerLoc < 0) {
|
||||
LOG("OOPS, no framebufferTexture shader : %d", texSamplerLoc);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user