Raylib5Backend.palettedAlphaImageShaderCode
class Raylib5Backend
enum palettedAlphaImageShaderCode =
q{
#version 330
in vec2 fragTexCoord;
in vec4 fragColor;
out vec4 finalColor;
uniform sampler2D texture0;
uniform sampler2D palette;
uniform vec4 colDiffuse;
void main() {
// index.a is alpha/opacity
// index.r is palette index
vec4 index = texture(texture0, fragTexCoord);
vec4 texel = texture(palette, vec2(index.r, 0));
finalColor = texel * vec4(1, 1, 1, index.a) * colDiffuse * fragColor;
}
};
fluid backend raylib5 Raylib5Backend
destructorsfunctionsmanifest constants
Shader code for palette iamges.