Implement Texture Units, bugfix guessChannelCountAndInternalFormat

This commit is contained in:
2025-11-13 06:53:24 +00:00
parent ad56624b51
commit d3dc397353
6 changed files with 33 additions and 12 deletions

View File

@@ -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);
}

BIN
assets/textures/flames.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB