Class
FogUniform
View sourceCPU-side payload for fog color, distance parameters, and height fade parameters.
Constructor
View source
Properties
static BlockSize : number
View sourcestd140 keeps the block aligned to a 16-byte slot.
Default: 48
readonly bindingSize : number
View sourceSize of a single fog slot in the shared buffer.
slots : WeakMap<Camera, number>
View sourceMaps cameras to fog slots for the current frame.
Default: ...
nextSlot : number
View sourceNext fog slot to allocate.
Default: 0
readonly buffer : UniformBuffer
View sourceBacking CPU-side buffer used by the renderer’s GPU cache.
Default: ...
Methods
reset ( ) : void
View source Clears per-frame slot assignments and discards stale fog data.
getSlot ( camera: Camera ) : number
View source Returns the fog slot for a camera, allocating one if needed.
getOffset ( camera: Camera ) : number | undefined
View source Returns the dynamic offset for a camera if one was assigned.
setFog ( camera: Camera , fog: Fog ) : number
View source Writes a fog payload into the slot associated with a camera.