Last active
August 15, 2023 05:27
-
-
Save thatcosmonaut/a7d1048f9992dee62d45f1d718feb217 to your computer and use it in GitHub Desktop.
Ambient lighting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 450 | |
layout(location = 0) in vec4 InColor; | |
layout(location = 0) out vec4 FragColor; | |
layout(binding = 0, set = 3) uniform UBO | |
{ | |
vec4 LightColor; | |
float AmbientStrength; | |
} ubo; | |
void main() | |
{ | |
vec3 ambientColor = ubo.AmbientStrength * ubo.LightColor * InColor; | |
FragColor = vec4(ambientColor, 1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment