r/GraphicsProgramming • • Apr 01 '18

How to reduce my GPU load when writing shaders?

/r/gamedev/comments/88pp37/how_to_reduce_my_gpu_load_when_writing_shaders/
1 Upvotes

2 comments sorted by

3

u/teawreckshero Apr 01 '18

Crashed the whole PC? What version of windows are you running? You should still be able to kill the process without taking down the whole machine.

What factors should I consider when working with shaders and other graphics code on such a PC?

Reduce the number of tris per frame and the amount of overdraw. Beyond that, keep your shaders short, especially your PSs. If you have to use a loop, don't make each iteration dependent on the last, and try to unroll it. If it's going to iterate so many times that you can't unroll it, you probably shouldn't have it in a shader.

Should I try doing 3d->2d conversion completely on CPU and only use OpenGL for lighting and fragment shaders?

No. How complex are your VSs getting?

0

u/[deleted] Apr 01 '18

[deleted]

1

u/smthamazing Apr 02 '18

Thanks, this is the kind of advice I'm looking for!