top | item 35846080

(no title)

micahscopes | 2 years ago

I recently used it (in combination with copilot) to help me implement weighted, blended, order-independent transparency for a network visualization project I'm working on... in just one long evening.

Only to realize in the process that all I really needed was to modify the shader program's depth checking behavior. Even just disabling it altogether looks fine and makes everything way faster. Never in my wildest imagination a year ago would I even dream of implementing WBOIT in one night and then just leaving it in a branch for a one line change.

In the process I realized a little trick on my own, using what I learned, that modifying the depth values in the fragment shader could allow selective alpha-blending/occlusion. Basically the idea was to put stuff I wanted to blend order-independently all at an equal z position and then set the depth function to "less than or equal" instead of "less than". I used the occluding geometry's depth buffer as a source to modify the translucent stuff's depth buffer in the fragment shader (with a slight offset to get it behind the occluding stuff).

There's absolutely no way I'd have had the guts to try all that in one night without the robot tools.

discuss

order

fnordpiglet|2 years ago

That’s what I’ve been using it for - unblocking my own mind. It almost never had the answer for me. But it breaks down my mental barrier. I’ve achieved more in the last three months than three years for this reason alone.