I implement texture masking using the frame buffer depth buffer in the following example:
https://github.com/mattdesl/lwjgl-basics/wiki/LibGDX-Masking#masking-with-depth-buffer
I got the ShapeRenderer working by changing the depth buffer, but now I want to change the depth buffer using the Pixmap. I need all the opaque pixels from pixmap to be written to the depth buffer as a 1.0 depth value, and all opaque pixels to be written as a depth value of 0.0.
I see a solution when writing individual pixels from a Pixmap using a ShapeRenderer. But it seems rather inefficient. Is there a more suitable and effective way?
source
share