문제

The simple question.
Is glsl/es float div operation MUCH slower than mul? I know it slower on x86, but is it slower on GPU?
When I look at GLSL disassembler I just see one more "rcp" command and all. How much costs that "rcp"?

도움이 되었습니까?

해결책

It varies from GPU to GPU, but in most cases, an rcp (reciprocal) instruction is roughly as expensive as a mul instruction. A divide ends up being roughly as expensive as a mul + an rcp. Both are fairly cheap compared to a texture lookup or branch of any kind.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top