withMutableUniforms(ofType:_:)
Calls the given closure with an inout reference to the underlying storage bound to the custom uniforms argument of a surface shader and geometry modifier.
Declaration
mutating func withMutableUniforms<UniformsType>(ofType: UniformsType.Type, _ callback: (inout UniformsType, inout CustomMaterial.ResourceStorage<UniformsType>) -> Void)Discussion
This method operates like withMutableUniforms(ofType:stage:_:) but sets the same value for all stages at once.
When using this form, ensure that the custom uniforms arguments passed to each stage of your CustomMaterial are of the same type.