MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / uniform

Method uniform

src/shaders.rs:152–158  ·  view source on GitHub ↗

Sets a uniform value on the shader. Supports `f32`, `[f32; 2]`, `[f32; 3]`, `[f32; 4]`, `i32`, and `[[f32; 4]; 4]`.

(&mut self, name: &str, value: impl Into<ShaderUniformValue>)

Source from the content-addressed store, hash-verified

150 ///
151 /// Supports `f32`, `[f32; 2]`, `[f32; 3]`, `[f32; 4]`, `i32`, and `[[f32; 4]; 4]`.
152 pub fn uniform(&mut self, name: &str, value: impl Into<ShaderUniformValue>) -> &mut Self {
153 self.uniforms.push(ShaderUniform {
154 name: name.to_string(),
155 value: value.into(),
156 });
157 self
158 }
159
160 /// Builds the ShaderConfig from this builder.
161 pub(crate) fn into_config(&mut self) -> ShaderConfig {

Calls

no outgoing calls