Just some questions about ogl fragment shader perf
BlitzMax Forums/OpenGL Module/Just some questions about ogl fragment shader perf
| ||
Hey there, just doing some calculations about a little ogl renderer, and got stuck with a question: How much rendering time can u spend discarding a pixel to be rendered in a fragment shader? Propably this also depends on Hardware, and the calculations to be done before, but how much time is finally to be saved if anyhow? thx for fast answers, BeAnAge |
| ||
Guess it depends on how much work you do on the fragments that pass the test - if it's heavy work, you're going to see more benefit? |
| ||
what i actually mean: when drawing a screen sized image, whose content gets indicated by a shader, but u know theres always big areas where nothing wont be drawn at all, is it possible to get the drawing time about equal to that of an image sized sqr(actually drawn pixels)? discard checkings are about that: #pseudocode if{var<value or var>value, then{discard} else{ ... \\perform actual calculations } |