setTexture method

void setTexture(
  1. String name,
  2. Texture texture, {
  3. SamplerOptions? sampler,
})

Sets a sampler parameter named name on every member that declares it.

Implementation

void setTexture(
  String name,
  gpu.Texture texture, {
  gpu.SamplerOptions? sampler,
}) {
  for (final material in _materials) {
    if (material.parameters.hasSampler(name)) {
      material.parameters.setTexture(name, texture, sampler: sampler);
    }
  }
}