SkyPhysicalShader class final
sky_physical.frag: sunlight scattered once by molecules and by haze along
the view ray, the disc and the stars through what the air leaves, and the
ground below the horizon — P5.
Its vertex stage is SkyVertexShader under a second name: the GLSL has a
sky_physical.vert of its own because varyings are matched by name there,
but both pass the same twenty-seven floats straight through, and a copy of
a loop that copies would be a transcription of nothing.
Transcribed from the GLSL line for line, beside a third copy in
PhysicalSky.look, for the reason SkyShader gives. Doubles here and
single precision there; the march is smooth enough that the two agree to
well under a step of eight bits. The one place that is not smooth is the
stars' hash, where a fract decides whether a cell holds a star, and there
every product is rounded to single precision, as the GPU computes it.
- Inheritance
-
- Object
- CpuFragmentShader
- SkyPhysicalShader
Constructors
- SkyPhysicalShader()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
Float32List v, ShaderBindings b, FragmentContext c) → Vector4? -
Returns linear RGBA for attachment zero. Null discards the fragment.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited