Skip to content

Commit

Permalink
Merge branch 'Better-Sun-Moon-Textures' of https://github.com/OpenSau…
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenSauce04 committed Apr 25, 2021
2 parents 82e1288 + d996efc commit bc23f89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shaders/glsl/sun_and_moon.fragment
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ void main()
highp vec3 dp1 = dFdx(worldPosition.xyz);
highp vec3 dp2 = dFdy(worldPosition.xyz);

vec3 normal = (normalize(cross(dp1, dp2)) + 1.0) / 2.0;
vec3 normal = (normalize(cross(dp1, dp2)) + 1.0) / 2.0;


gl_FragColor = CURRENT_COLOR * diffuse * length(diffuse.rgb);
gl_FragColor += halo * haloTint /*+ sun * sunTint*/;

float sunHaloIntensity = 0.6;
float moonHaloIntensity = 0.4;
float sunHaloIntensity = 0.6;
float moonHaloIntensity = 0.4;
float haloIntensity = sunHaloIntensity + abs((isDay * moonHaloIntensity) - moonHaloIntensity);

gl_FragColor.a *= haloIntensity - (isRain * haloIntensity);
Expand Down

0 comments on commit bc23f89

Please sign in to comment.