performance - Is it faster to do bitwise inside an OpenGL shader or beforehand in C++? -
i unsure whether should , perform bitwise operations , division inside opengl fragment shader, or before running shader (calculate in c++ , pass uniform). i'm doing converting hex int representing rgb value color can used drawing in opengl. faster [on systems]?
if single value calculated per draw call, in c++.
gpus insanely fast, there's little point in getting them calculate same value millions of vertices or fragments.
however, there's question of how data passed around. if suspect there's difference, try both approaches , profile them.
Comments
Post a Comment