Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
42
pub fn saturate(x: f32) -> f32 {
43
x.clamp(0.0, 1.0)
44
}
45
46
pub fn pow(v: Vec3, power: f32) -> Vec3 {
47
vec3(v.x.powf(power), v.y.powf(power), v.z.powf(power))
Callers
2
sky
Function · 0.85
smoothstep
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected