refine: add milky translucency and curved reflections to Dock
This commit is contained in:
@@ -29,7 +29,7 @@ void main() {
|
||||
float rim = 1.0 - smoothstep(0.0, radius * 0.46, depth);
|
||||
// Curved glass bends rays most at its edge, with subtle centre magnification.
|
||||
vec2 ray = centre + local / (1.0 + u_strength * 0.075)
|
||||
- normal * rim * rim * radius * u_strength * 0.20;
|
||||
- normal * rim * rim * radius * u_strength * 0.23;
|
||||
vec4 colour = texture(u_background, sampleUV(ray));
|
||||
float dispersion = u_strength * rim * 0.65;
|
||||
colour.r = texture(u_background, sampleUV(ray + normal * dispersion)).r;
|
||||
@@ -41,6 +41,9 @@ void main() {
|
||||
vec4 reflected = texture(u_background,
|
||||
sampleUV(point + normal * radius * 0.40));
|
||||
colour = mix(colour, reflected, min(edge_light * 0.18, 0.22));
|
||||
// A grazing-angle white reflection gives the curved rim visible thickness;
|
||||
// the broad centre continues to transmit the live, lightly softened scene.
|
||||
colour.rgb = mix(colour.rgb, vec3(colour.a), min(edge_light * 0.12, 0.16));
|
||||
float reflection = edge_light * 0.07;
|
||||
colour.rgb = min(colour.rgb + reflection * colour.a, vec3(colour.a));
|
||||
frag_color = colour;
|
||||
|
||||
Reference in New Issue
Block a user