Skip to content

Commit

Permalink
Terrain High shader: Increase shadow-mapping impact on terrain bright…
Browse files Browse the repository at this point in the history
…ness
  • Loading branch information
past-due committed Sep 8, 2023
1 parent 907cc46 commit be0df66
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_high.frag
Expand Up @@ -130,7 +130,7 @@ vec4 doBumpMapping(BumpData b, vec3 lightDir, vec3 halfVec) {
float blinnTerm = clamp(dot(b.N, H), 0.f, 1.f);
blinnTerm = lambertTerm != 0.0 ? blinnTerm : 0.0;
blinnTerm = pow(blinnTerm, 16.f);
float visibility = getShadowVisibility();
float visibility = pow(getShadowVisibility(), 2.f);
vec4 lightmap_vec4 = texture(lightmap_tex, uvLightmap, 0.f);

float adjustedTileBrightness = pow(lightmap_vec4.a, 1.5f); // ... * tile brightness / ambient occlusion (stored in lightmap.a)
Expand Down
2 changes: 1 addition & 1 deletion data/base/shaders/vk/terrain_combined_high.frag
Expand Up @@ -72,7 +72,7 @@ vec4 doBumpMapping(BumpData b, vec3 lightDir, vec3 halfVec) {
float blinnTerm = clamp(dot(b.N, H), 0.f, 1.f);
blinnTerm = lambertTerm != 0.0 ? blinnTerm : 0.0;
blinnTerm = pow(blinnTerm, 16.f);
float visibility = getShadowVisibility();
float visibility = pow(getShadowVisibility(), 2.f);
vec4 lightmap_vec4 = texture(lightmap_tex, frag.uvLightmap, 0.f);

float adjustedTileBrightness = pow(lightmap_vec4.a, 1.5f); // ... * tile brightness / ambient occlusion (stored in lightmap.a)
Expand Down

0 comments on commit be0df66

Please sign in to comment.