その先にあるもの…

Z Buffer State 본문

프로그래밍/3D

Z Buffer State

specialJ 2015. 3. 4. 19:40
  • D3DRS_ZENABLE - used to set the buffering method. Choices are D3DZB_TRUE to enable Z buffering, D3DZB_USEW to enable W buffering (rarely used) or D3DZB_FALSE to disable Z buffering. To enable a Z buffer also see the Z buffer page.

  • D3DRS_ZWRITEENABLE - you can turn on or off the writing of data to the Z buffer (TRUE or FALSE). Normally you want it enabled so that geometry is only rendered if it is in front of previous rendered geometry (relative to the camera). You can however turn this off at particular times so you do not write to the Z buffer but can still read from it. This can be useful for advanced rendering techniques. E.g. if you are trying to save fill rate you may want to render something late but you do not want to write into the z buffer but simply read from it.
    시스템이 새로운 깊이 값으로 깊이 버퍼 갱신을 막을 수 있다.

  • D3DRS_ZFUNC - allows control of the way the depth buffer value is used in determining if a pixel should be rendered. Normally this is D3DCMP_LESSEQUAL which means that a pixel is rendered if it's distance (depth) is less or equal to what was rendered at that pixel previously. There are many other advanced options like: D3DCMP_NEVERD3DCMP_LESSD3DCMP_EQUAL etc. look in the help file for full details


http://www.toymaker.info/Games/html/render_states.html#Zbuffer

'프로그래밍 > 3D' 카테고리의 다른 글

matcap  (0) 2015.09.02
Frustum 그리기  (0) 2015.03.19
Dissolve Shader  (0) 2015.02.11
NVidia NearClipPlane  (0) 2014.03.25
normal에 역행렬 전치행렬하는 이유  (0) 2014.03.25
Comments