diff --git a/8_ice_scene.frag b/8_ice_scene.frag index ccb468a..c6a2a6c 100644 --- a/8_ice_scene.frag +++ b/8_ice_scene.frag @@ -35,7 +35,7 @@ vec3 shardLocal(vec3 p, float phase) { p.yz /= vec2(1.0, 1.45); return abs(p); } -const float SHARD = 0.70; // how big the shard is in sheet units +const float SHARD = 0.95; // how big the shard is in sheet units // Cross two octahedra: the intersection is an eight-sided gem, so the shard still // reads as a cut stone from any angle instead of a flat kite. vec3 gemAxes(vec3 l, out vec2 r) { diff --git a/9_ice_over_obj.frag b/9_ice_over_obj.frag index fef1b4f..1dc4343 100644 --- a/9_ice_over_obj.frag +++ b/9_ice_over_obj.frag @@ -87,9 +87,7 @@ void main() { float depth = solid ? OBJECT_DEPTH : texture2D(u_scene, atlasUV(hit.xy + par, layer)).a * 2.6; float path = (hit.z - (FRONT - depth)) / -inside.z; // ice crossed to reach this sheet - // The shard keeps its shape: it is sampled without the refraction offset, so it - // stays one solid piece instead of being cut up by the crack steps. - vec2 at = solid ? hit.xy + par * 0.5 : (hit + inside * path).xy + par; + vec2 at = (hit + inside * path).xy + par; vec3 plasma; plasma.r = texture2D(u_scene, atlasUV(at + shearR * path, layer)).r; plasma.g = texture2D(u_scene, atlasUV(at, layer)).g; diff --git a/ice_object.html b/ice_object.html index 1318490..eafaaac 100644 --- a/ice_object.html +++ b/ice_object.html @@ -16,8 +16,8 @@ canvas{display:block;width:100%;height:100%;touch-action:none}
Сквозь лёд
Двигайте мышь · скорость − / =