Added ambient lighting
This commit is contained in:
parent
dea312a704
commit
482205b96e
9 changed files with 69 additions and 9 deletions
|
@ -6,7 +6,12 @@ out vec4 FragColor;
|
|||
uniform sampler2D texture1;
|
||||
uniform sampler2D texture2;
|
||||
|
||||
uniform float ambientStrength;
|
||||
uniform vec3 ambientColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
FragColor = mix(texture(texture1, oUV), texture(texture2, oUV), 0.2);
|
||||
vec3 ambient = ambientColor * ambientStrength;
|
||||
|
||||
FragColor = mix(texture(texture1, oUV), texture(texture2, oUV), 0.2) * vec4(ambient, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue