Files
XCEngine/engine/assets/builtin/shaders/unlit/unlit.frag.glsl

23 lines
498 B
Plaintext
Raw Normal View History

2026-04-03 17:18:46 +08:00
// XC_BUILTIN_UNLIT_OPENGL_PS
#version 430
layout(binding = 0) uniform sampler2D uBaseColorTexture;
2026-04-03 17:18:46 +08:00
layout(std140, binding = 0) uniform PerObjectConstants {
2026-04-03 17:18:46 +08:00
mat4 gProjectionMatrix;
mat4 gViewMatrix;
mat4 gModelMatrix;
mat4 gNormalMatrix;
};
layout(std140, binding = 1) uniform MaterialConstants {
2026-04-03 17:18:46 +08:00
vec4 gBaseColorFactor;
};
in vec2 vTexCoord;
layout(location = 0) out vec4 fragColor;
void main() {
fragColor = texture(uBaseColorTexture, vTexCoord) * gBaseColorFactor;
}