ShaderMaterial constructor
ShaderMaterial({})
Creates a ShaderMaterial wrapping fragmentShader.
The shader is typically loaded from a .shaderbundle produced
by flutter_gpu_shaders. May be omitted at construction and
assigned later via setFragmentShader; rendering throws until a
shader is set. Set useEnvironment to true to have the engine
bind the scene environment's IBL textures by their standard
names.
Implementation
ShaderMaterial({
gpu.Shader? fragmentShader,
this.useEnvironment = false,
this.cullingMode = gpu.CullMode.backFace,
this.windingOrder = gpu.WindingOrder.counterClockwise,
this.isOpaqueOverride = true,
}) {
if (fragmentShader != null) {
setFragmentShader(fragmentShader);
}
}