Skip to content

Commit

Permalink
Tweak medium terrain shader to better match the previous shader
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 5, 2023
1 parent c129ab0 commit 74b4cc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/base/shaders/terrain_combined_medium.frag
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ vec4 main_medium() {
vec3 N = vec3(0.f,0.f,1.f);
float lambertTerm = max(dot(N, L), 0.0); // diffuse lighting
vec4 lightmap_vec4 = texture(lightmap_tex, uvLightmap, 0.f);
vec4 light = (visibility*diffuseLight*0.75*lambertTerm + ambientLight*0.25) * lightmap_vec4.a; // ... * tile brightness / ambient occlusion (stored in lightmap.a)
vec4 light = (visibility*diffuseLight*0.8*(lambertTerm*lambertTerm) + ambientLight*0.2) * lightmap_vec4.a; // ... * tile brightness / ambient occlusion (stored in lightmap.a)
light.rgb = blendAddEffectLighting(light.rgb, (lightmap_vec4.rgb / 1.5f)); // additive color (from environmental point lights / effects)
light.a = 1.f;

Expand Down
2 changes: 1 addition & 1 deletion data/base/shaders/vk/terrain_combined_medium.frag
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ vec4 main_medium() {
vec3 N = vec3(0.f,0.f,1.f);
float lambertTerm = max(dot(N, L), 0.0); // diffuse lighting
vec4 lightmap_vec4 = texture(lightmap_tex, frag.uvLightmap);
vec4 light = (visibility*diffuseLight*0.75*lambertTerm + ambientLight*0.25) * lightmap_vec4.a; // ... * tile brightness / ambient occlusion (stored in lightmap.a)
vec4 light = (visibility*diffuseLight*0.8*(lambertTerm*lambertTerm) + ambientLight*0.2) * lightmap_vec4.a; // ... * tile brightness / ambient occlusion (stored in lightmap.a)
light.rgb = blendAddEffectLighting(light.rgb, (lightmap_vec4.rgb / 1.5f)); // additive color (from environmental point lights / effects)
light.a = 1.f;

Expand Down

0 comments on commit 74b4cc9

Please sign in to comment.