fromUIImages static method

Future<EnvironmentMap> fromUIImages({
  1. required Image radianceImage,
  2. Image? irradianceImage,
})

Implementation

static Future<EnvironmentMap> fromUIImages(
    {required ui.Image radianceImage, ui.Image? irradianceImage}) async {
  final radianceTexture = await gpuTextureFromImage(radianceImage);
  gpu.Texture? irradianceTexture;

  if (irradianceImage != null) {
    irradianceTexture = await gpuTextureFromImage(irradianceImage);
  }

  return EnvironmentMap.fromGpuTextures(
      radianceTexture: radianceTexture, irradianceTexture: irradianceTexture);
}