- Home /
Removing trig functions from mobile shaders
Hello,
I'm wondering about low level optimizations for shader performance on mobile devices. Are trig functions single cycle operations on modern mobile GPUs, or are they implemented with lower level intrinsics?
I can afford (visually) to replace trig functions with a triangle wave like the following snippet; however, I'm not sure how to know if this would make sense. /* Returns the value of a signed periodic triangle wave (1 periodic) */ half triangle_wave (half x) { return 4.0*(abs(frac(x) - 0.5) - 0.25); }
Thanks!
Your answer
Follow this Question
Related Questions
Performance impact of OnMouse_ event handlers on mobile 1 Answer
Add 2d rigidbodies to moving objects to increase performance or not? 1 Answer
Detecting Input on ~100 Objects 2 Answers
Why are gravity rigidbodies so performance costly? 1 Answer
Colliders vs Callbacks: Which is better for performance in my case? 0 Answers