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

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -