c++ - Quick question about glColorMask and its work -


i want render depth buffer nice shadow mapping. drawing code though, consists of many shader switches. if set glcolormask(0,0,0,0) , leave shader programs, textures , others are, , render depth buffer, 'ok' ? mean, if glcolormask disables "write of color components", mean per-fragment shading is not going performed?

for rendering shadow map, want bind depth texture (preferrably square , power of two, because stereo drivers take hint!) fbo , use 1 shader (as simple possible) everything. not want attach color buffer, because not interested in color @ all, , puts more unnecessary pressure on rop (plus, hardware can render double speed or more depth-only). not want switch between many shaders.

depending on whether "classic" shadow mapping, or more sophisticated such exponential shadow maps, shader use either simple can (constant color, , no depth write), or performs (moderately complex) calculations on depth, not want perform colour calculations, since mean needless calculations not visible in way.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -