This commit is contained in:
2025-01-06 00:45:28 +03:00
parent 27f6b11f8f
commit 0629544314
89 changed files with 2236 additions and 125198 deletions

View File

@@ -7,12 +7,12 @@ uniform mat4 uViewMatrix;
layout (location = 0) in vec3 aPosition;
layout (location = 1) in vec2 aUV;
layout (location = 2) in vec4 aColor;
layout (location = 3) in int aTextureId;
layout (location = 3) in float aTextureId;
layout (location = 4) in mat4 aModel;
layout (location = 0) out vec4 oColor;
layout (location = 1) out vec2 oUV;
layout (location = 2) flat out int oTextureId;
layout (location = 2) flat out float oTextureId;
void main()
{
@@ -30,7 +30,7 @@ uniform sampler2D uTexture[16];
layout (location = 0) in vec4 iColor;
layout (location = 1) in vec2 iUV;
layout (location = 2) flat in int iTextureId;
layout (location = 2) flat in float iTextureId;
layout (location = 0) out vec4 FragColor;
@@ -39,7 +39,7 @@ void main()
FragColor = iColor;
if (iTextureId >= 0)
FragColor *= texture(uTexture[iTextureId], iUV);
FragColor *= texture(uTexture[int(iTextureId)], iUV);
if (FragColor.a == 0.0)
discard;