mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-05 06:24:27 +01:00
fix(shaders): the highlight of the sun is multiplied by the cosine of its light, so surfaces no longer glare milky white under a low sun; headlights light a surface with 1.35 of its diffuse colour and add a GGX highlight of their own scaled by specgloss and param_specular instead of multiplying the whole light by one plus param_specular; normalmap, parallax, detail, shadowless, sunless and default_detail materials read param_glossiness as a Phong exponent, roughness = (2 / (n + 2))^1/4, instead of 1 - 1/n or a fixed mirror
This commit is contained in:
@@ -64,7 +64,7 @@ vec3 apply_lights_sunless(vec3 fragcolor, vec3 fragnormal, vec3 texturecolor, fl
|
||||
float diffuseamount = sun_NdotL * lights[0].intensity;
|
||||
fragcolor += envcolor * reflectivity;
|
||||
float specularamount = (sunlight.y * param[1].y * specularity) * lights[0].intensity;
|
||||
glossiness = abs(param[1].w);
|
||||
glossiness = phong_glossiness();
|
||||
|
||||
for (uint i = 1U; i < lights_count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user