Log inGet started
Package

racingline.shader

Newest version

README.md

racingline

Alpha-blended, self-lit surface shader for the Forza-style driving line (nring.racingline). It draws one whole-lap ribbon mesh laid a few centimetres above the asphalt: uv.x runs across the strip, uv.y is the vertex's lap distance (m), and the vertex colour carries the target speed (r × 100 m/s), the corner-zone weight (g) and the action (b: 0 accelerate, 0.5 lift, 1 brake). Instance lane 0 is the car's lap distance, its speed, the lap length and the corners-only flag; lane 1 is the reach ahead, the fade behind, the opacity and a debug switch. Only the stretch from a few metres behind the car to reach ahead draws, coloured green / yellow / red by how far the car's current speed is above the target speed at each fragment (lift_share, brake_share), with soft edges and forward chevrons that fade out with distance.