Fix lighting difference between webgl and webgl2

This commit is contained in:
schmelczerandras 2020-10-13 22:57:27 +02:00
parent f29293c475
commit 98f0b381b8
2 changed files with 2 additions and 3 deletions

View file

@ -68,7 +68,7 @@ void main() {
vec3 colorAtPosition = rgbaColorAtPosition.rgb;
vec3 lighting = ambientLight;
vec3 lightingInside = lighting * INTENSITY_INSIDE_RATIO;
vec3 lightingInside = ambientLight;
#ifdef CIRCLE_LIGHT_COUNT
#if CIRCLE_LIGHT_COUNT > 0
@ -121,7 +121,7 @@ void main() {
#endif
vec3 outsideColor = {backgroundColor}.rgb * lighting;
vec3 insideColor = colorAtPosition * lightingInside;
vec3 insideColor = colorAtPosition * lightingInside * INTENSITY_INSIDE_RATIO;
float edge = clamp(startingDistance / shadingNdcPixelSize, 0.0, 1.0);
vec3 antialiasedColor = mix(insideColor, outsideColor, edge);

View file

@ -86,7 +86,6 @@ void main() {
float startingDistance = getDistance(uvCoordinates);
vec3 lighting = ambientLight;
vec3 lightingInside = ambientLight;