Ending: rail camera, stable far planet, green bursts from a US landing

Flights run on rails at even speed along the spline with eased ends and
smooth zoom pushes, no hand-held shake. Grass fur, sector lines and
shadows fade out as the camera climbs, and above 250 m the ground swaps
to an even cube-sphere skin so the relief no longer pops while orbiting.
Per-shot FOV, motion blur, slamming titles and a warp to Earth; the
rocket now lands in Kansas and the green bursts straight out of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Bonchellon
2026-12-01 16:30:08 +03:00
parent a3e4f00282
commit d4dff6ea99
6 changed files with 289 additions and 41 deletions

View File

@ -80,6 +80,9 @@ Shader "GrassCutter/GrassFur"
float4 _GcPushers[8]; // x, y, z, radius
float _GcPusherCount;
float _GcTime, _GcHeight, _GcFurScale, _GcFurMax;
// 0 normally; climbing to 1 as a film's lens leaves the ground: the whole field dissolves evenly into the
// planet's own far ground, so no ring of the near detail stays in shot
float _GcFarOnly;
struct Attributes
{
@ -183,6 +186,7 @@ Shader "GrassCutter/GrassFur"
float ign = frac(52.9829189 * frac(dot(i.positionCS.xy, float2(0.06711056, 0.00583715))));
float e = (ign - 0.5) * _GcShells.w;
if ((_GcShells.y > 0 && dist < _GcShells.y + e) || dist >= _GcShells.z + e) discard;
if (_GcFarOnly > 0 && frac(ign * 7.31 + 0.37) < _GcFarOnly) discard;
// a sector's square reaches past its borders: each pixel belongs to one sector
#if defined(GC_SECTOR_BUFFER)

View File

@ -45,6 +45,8 @@ Shader "GrassCutter/Ground"
float _GcSkyOn, _GcTime;
// 1 once the whole planet is mown (EndingCinematic): the far meadow is stubble and soil, as the cut sectors are drawn
float _GcBald;
// a film's lens leaving the ground (0 .. 1): the sector lines go and the cloud shade softens
float _GcFarOnly;
float4 _GcCam;
float4x4 _GcSkyRot;
float4 _GcIcoN[20], _GcIcoR0[20], _GcIcoR1[20], _GcIcoR2[20];
@ -110,12 +112,13 @@ Shader "GrassCutter/Ground"
float edge = HexEdge(up);
float pixel = max(fwidth(edge), 1e-3);
float line_ = (1 - smoothstep(0.1, 0.1 + pixel, edge)) * saturate(0.16 / pixel);
col = lerp(col, _Border.rgb, line_ * (1 - smoothstep(120, 320, dist)));
col = lerp(col, _Border.rgb, line_ * (1 - smoothstep(120, 320, dist)) * (1 - _GcFarOnly));
Light main = GetMainLight(TransformWorldToShadowCoord(p));
float ndl = saturate(dot(nrm, main.direction));
float3 ambient = SampleSH(_GcSkyOn > 0.5 ? mul((float3x3)_GcSkyRot, nrm) : nrm);
float3 lit = col * (main.color * ndl * lerp(0.3, 1, main.shadowAttenuation) * GcCloudSun(p, _GcTime) + ambient + GcLamp(p));
float clouds = lerp(GcCloudSun(p, _GcTime), 1, _GcFarOnly * 0.6);
float3 lit = col * (main.color * ndl * lerp(0.3, 1, main.shadowAttenuation) * clouds + ambient + GcLamp(p));
lit *= GcContact(p);
lit = MixFog(lit, i.fog);
return half4(lit, 1);