문제

Is it somehow possible to control for each fragment whether or not depth shall be written to the depth buffer?

I want my object to be depth tested properly (therefore I need to output accurate depth per fragment for testing), but I want only some of the fragments to write to the buffer.

Any way to do that?

도움이 되었습니까?

해결책

Render a pass that doesn't write to the color bufffer. Use clip/discard as you please.

Render another pass that writes to the color and not depth buffer.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top