Implement Texture Units, bugfix guessChannelCountAndInternalFormat
This commit is contained in:
@@ -4,9 +4,16 @@ out vec4 FragColour;
|
||||
in vec4 ourColour;
|
||||
in vec2 TexCoord;
|
||||
|
||||
uniform sampler2D ourTexture;
|
||||
uniform sampler2D texture1;
|
||||
uniform sampler2D texture2;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColour = texture(ourTexture, TexCoord);
|
||||
vec4 tex1Color = texture(texture1, TexCoord);
|
||||
vec4 tex2Color = texture(texture2, TexCoord);
|
||||
|
||||
if (tex2Color.a < 0.1)
|
||||
tex2Color = tex1Color;
|
||||
|
||||
FragColour = mix(tex1Color, tex2Color, 0.4f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user