質問

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