Loading of multiple textures
This commit is contained in:
@@ -8,6 +8,7 @@ out vec3 color;
|
||||
|
||||
// Values that stay constant for the whole mesh.
|
||||
uniform sampler2D myTextureSampler;
|
||||
uniform sampler2D myTextureSampler2;
|
||||
|
||||
// Relative width/height of a pixel
|
||||
uniform float pixWidth;
|
||||
@@ -22,13 +23,16 @@ int UNSET = -1;
|
||||
|
||||
|
||||
vec3 getColor(vec2 uvCoord) {
|
||||
return texture(myTextureSampler, uvCoord).rgb;
|
||||
return texture(myTextureSampler2, uvCoord).rgb;
|
||||
}
|
||||
|
||||
bool isBackground(vec3 c) {
|
||||
// 49,206, 11
|
||||
/*// 49,206, 11
|
||||
if (all( lessThanEqual(c, vec3(51.0f/255.0f, 208.0f/255.0f, 13.0f/255.0f))) &&
|
||||
all(greaterThanEqual(c, vec3(47.0f/255.0f, 204.0f/255.0f, 9.0f/255.0f)))
|
||||
all(greaterThanEqual(c, vec3(47.0f/255.0f, 204.0f/255.0f, 9.0f/255.0f)))*/
|
||||
// 0, 255, 0
|
||||
if (all( lessThanEqual(c, vec3(2.0f/255.0f, 255.0f/255.0f, 2.0f/255.0f))) &&
|
||||
all(greaterThanEqual(c, vec3(0.0f/255.0f, 253.0f/255.0f, 0.0f/255.0f)))
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user