XrayShader class final

xray.frag: the same albedo, and not one word about the surface.

The whole of what makes it a second shader is what it does NOT do — FragmentContext.surface is left null, so cpu_encoder.dart writes nothing to attachment one. The GLSL says it with #define F3D_NO_SURFACE_BUFFER, which compiles WriteSurfaceGeometry away; here the transcription is writeLit without the writeSurface half, which is applyFog and the alpha.

Not a call to UnlitShader with the surface cleared afterwards. That would work and would read as a tidy-up rather than as the point: a silhouette is drawn where its node is behind what the depth buffer holds, so anything it wrote to the surface buffer would describe geometry that is not visible — and SSAO and reflections read that buffer as the nearest surface. See renderer_xray_pass.dart.

Implemented types

Constructors

XrayShader()
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 bindings, 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