1
0
mirror of synced 2025-02-12 09:12:59 +01:00
KillzXGaming 0c126e4155 More improvements.
Rewrote the compression handling from scatch. It's way easier and cleaner to add new formats code wise as it's handled like file formats.
Added wip TVOL support (Touhou Azure Reflections)
Added XCI support. Note I plan to improve NSP, XCI, NCA, etc later for exefs exporting.
The compression rework now compresses via streams, so files get decompressed properly within archives as streams.
Added hyrule warriors bin.gz compression along with archive rebuilding. Note i do not have texture rebuilding done just yet.
2019-09-15 19:13:01 -04:00

44 lines
913 B
GLSL

#version 330
uniform vec4 blackColor;
uniform vec4 whiteColor;
uniform int hasTexture0;
uniform int debugShading;
uniform int numTextureMaps;
uniform sampler2D textures0;
uniform sampler2D uvTestPattern;
in vec2 uv0;
in vec4 vertexColor0;
out vec4 fragColor;
void main()
{
vec4 textureMap0 = vec4(1);
vec4 textureMap1 = vec4(1);
vec4 textureMap2 = vec4(1);
if (numTextureMaps > 0)
{
if (hasTexture0 == 1)
textureMap0 = texture2D(textures0, uv0);
}
if (debugShading == 0)
{
vec4 colorBlend = textureMap0 * whiteColor;
fragColor = vertexColor0 * colorBlend;
}
else if (debugShading == 5)
fragColor = vec4(textureMap0.rgb, 1);
else if (debugShading == 1)
fragColor = vertexColor0;
else if (debugShading == 2)
fragColor = whiteColor;
else if (debugShading == 3)
fragColor = blackColor;
else if (debugShading == 4)
fragColor = texture2D(uvTestPattern, uv0);
}