Skip to content

Commit

Permalink
Add minimum lighting
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Noah committed Apr 19, 2021
1 parent 9ee0baf commit 08232f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ float calculateLighting(vec3 sun){
}
void main(){
vColor = vec4(vec3(calculateLighting(SUN_POSITION_0) + calculateLighting(SUN_POSITION_1) + (calculateLighting(SUN_POSITION_2) * 0.7)), 1.0) * color;
vColor = vec4(vec3(max(calculateLighting(SUN_POSITION_0) + calculateLighting(SUN_POSITION_1) + (calculateLighting(SUN_POSITION_2) * 0.7), AMBIENT)), 1.0) * color;
gl_Position = proj * view * model * vec4(position, 1.0);
}`;
Expand Down

0 comments on commit 08232f6

Please sign in to comment.