initializeStaticResources static method

Future<void> initializeStaticResources()

Loads the bundled BRDF lookup texture used by the PBR fragment shader's split-sum specular IBL.

Called by the Scene constructor; rendering is gated on the returned Future completing. The same future is reused on subsequent calls.

Implementation

static Future<void> initializeStaticResources() {
  return gpuTextureFromAsset(
    'packages/flutter_scene/assets/ibl_brdf_lut.png',
  ).then((gpu.Texture value) {
    _brdfLutTexture = value;
  });
}