MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / saturate

Function saturate

examples/shaders/shared/src/lib.rs:42–44  ·  view source on GitHub ↗
(x: f32)

Source from the content-addressed store, hash-verified

40}
41
42pub fn saturate(x: f32) -> f32 {
43 x.clamp(0.0, 1.0)
44}
45
46pub fn pow(v: Vec3, power: f32) -> Vec3 {
47 vec3(v.x.powf(power), v.y.powf(power), v.z.powf(power))

Callers 2

skyFunction · 0.85
smoothstepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected