convert ambient to Vector4

This commit is contained in:
devel 2026-03-18 16:54:17 -04:00 committed by GitHub
parent e83940e4b6
commit 9ca4f49849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,8 +72,9 @@ int main(void)
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos"); shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
// Ambient light level // Ambient light level
Vector4 ambient = (Vector4){ 0.2f, 0.2f, 0.2f, 1.0f };
int ambientLoc = GetShaderLocation(shader, "ambient"); int ambientLoc = GetShaderLocation(shader, "ambient");
SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, SHADER_UNIFORM_VEC4); SetShaderValue(shader, ambientLoc, &ambient, SHADER_UNIFORM_VEC4);
Vector4 fogColor = ColorNormalize(GRAY); Vector4 fogColor = ColorNormalize(GRAY);
int fogColorLoc = GetShaderLocation(shader, "fogColor"); int fogColorLoc = GetShaderLocation(shader, "fogColor");