Skip to content

Commit

Permalink
Use lightmap in high water shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due authored and pull[bot] committed Jun 27, 2024
1 parent d398f14 commit 10861c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion data/base/shaders/vk/water.frag
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ vec4 main_bumpMapping()
float gaussianTerm = exp(-(exponent * exponent));

vec4 fragColor = (texture(tex1, uv1)+texture(tex2, uv2)) * (gloss+vec4(0.08,0.13,0.15,1.0));
return fragColor*(ambientLight+diffuseLight*lambertTerm) + specularLight*(1-gloss)*gaussianTerm*vec4(1.0,0.843,0.686,1.0);
fragColor = fragColor*(ambientLight+diffuseLight*lambertTerm) + specularLight*(1-gloss)*gaussianTerm*vec4(1.0,0.843,0.686,1.0);
vec4 light = texture(lightmap_tex, uvLightmap, 0.f);
return light * fragColor;
}

void main()
Expand Down
4 changes: 3 additions & 1 deletion data/base/shaders/water.frag
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ vec4 main_bumpMapping()
float gaussianTerm = exp(-(exponent * exponent));

vec4 fragColor = (texture(tex1, uv1)+texture(tex2, uv2)) * (gloss+vec4(0.08,0.13,0.15,1.0));
return fragColor*(ambientLight+diffuseLight*lambertTerm) + specularLight*(1-gloss)*gaussianTerm*vec4(1.0,0.843,0.686,1.0);
fragColor = fragColor*(ambientLight+diffuseLight*lambertTerm) + specularLight*(1-gloss)*gaussianTerm*vec4(1.0,0.843,0.686,1.0);
vec4 light = texture(lightmap_tex, uvLightmap);
return light * fragColor;
}

void main()
Expand Down

0 comments on commit 10861c1

Please sign in to comment.