GLSL SpinLock only Mostly Works

后端 未结 2 576
孤独总比滥情好
孤独总比滥情好 2020-12-18 16:47

I have implemented a depth peeling algorithm using a GLSL spinlock (inspired by this). In the following visualization, notice how overall the depth peeling algorithm functi

2条回答
  •  醉话见心
    2020-12-18 17:23

    The "imageAtomicExchange(img2D_0,coord,0);" needs to be inside the if statement, since it is resetting the lock variable even for threads that didn't have it! Changing this fixes it.

提交回复
热议问题