bind method

  1. @override
void bind(
  1. RenderPass pass,
  2. HostBuffer transientsBuffer,
  3. EnvironmentMap environment
)
override

Binds the fragment's uniform blocks, textures, and (when useEnvironment) the environment IBL samplers. Called by the engine during the background draw; not part of the app-facing API.

Implementation

@override
void bind(
  gpu.RenderPass pass,
  gpu.HostBuffer transientsBuffer,
  EnvironmentMap environment,
) {
  setUniformBlockFromFloats('PhysicalSkyInfo', <double>[
    ...sunDirection.storage,
    sunAngularRadius,
    ...rayleighColor.storage,
    rayleighCoefficient,
    ...mieColor.storage,
    mieCoefficient,
    turbidity,
    mieEccentricity,
    energy,
    0.0,
    ...groundColor.storage,
    1.0,
  ]);
  super.bind(pass, transientsBuffer, environment);
}