voxel-engine/shaders/cube_frag.glsl
2025-11-10 19:51:50 -06:00

12 lines
198 B
GLSL

#version 330 core
out vec4 FragColor;
// [NEW] This variable will be set from your C++ code
uniform vec3 u_Color;
void main()
{
// Use the color from C++
FragColor = vec4(u_Color, 1.0);
}