1
0
Fork 0

WS30: Initial shoreline shader

Using steepness to create a shoreline
This commit is contained in:
Stuart Buchanan 2022-02-05 16:23:49 +00:00
parent 98fda02e65
commit 8bba60772f

View file

@ -443,7 +443,11 @@ void main()
if ((water_shader == 1) && (fg_photoScenery == false) && fg_materialParams3[lc].x > 0.5) { if ((water_shader == 1) && (fg_photoScenery == false) && fg_materialParams3[lc].x > 0.5) {
// This is a water fragment, so calculate the fragment color procedurally // This is a water fragment, so calculate the fragment color procedurally
texel = generateWaterTexel(); // and mix with some sand colour if near an edge
//bool adjacentwater = fg_materialParams3[lc_n.x].x > 0.5;
//texel = mix(generateWaterTexel(), texel, adjacentwater ? 0.0 : smoothstep(0.1, 0.2, mfact[0]));
//texel = mix(generateWaterTexel(), vec4(0.6,0.6,0.4,1.0), adjacentwater ? 0.0 : smoothstep(0.1, 0.2, mfact[0]));
texel = mix(vec4(0.6,0.6,0.4,1.0), generateWaterTexel(), smoothstep(0.98,1.0,steepness));
fragColor = texel; fragColor = texel;
fragColor.rgb += getClusteredLightsContribution(ecPosition.xyz, n, fragColor.rgb); fragColor.rgb += getClusteredLightsContribution(ecPosition.xyz, n, fragColor.rgb);
} else { } else {