bind method

  1. @override
void bind(
  1. RenderPass pass,
  2. TransientWriter transientsBuffer,
  3. Lighting lighting
)
override

Binds this material's render-pass state, uniforms, and textures.

The base implementation enables back-face culling with clockwise winding on the Y-down rasterizer (accepting model-space CCW front faces). Subclasses must call super.bind and then bind any per-material uniforms and textures expected by their fragment shader. lighting carries the IBL EnvironmentMap (and its intensity) plus the analytic lights and shadow resources that materials shade against.

Implementation

@override
void bind(
  gpu.RenderPass pass,
  TransientWriter transientsBuffer,
  Lighting lighting,
) {
  final prepared = _prepared
    ..name = name
    ..depthBias = depthBias
    ..lodFade = lodFade
    ..lightListOffset = lightListOffset
    ..lightListCount = lightListCount;
  prepared.bind(pass, transientsBuffer, lighting);
}