I have been trying to implement Weighted Blended OIT from LearnOpenGL - Weighted Blended.
So the blending works correctly with one issue, when the transparent objects are behind opaque ones (but also other transparent ones), the transparent ones are see through.
First two images. Red and blue are opaque and green is transparent. All transparent objects have alpha of 0.5. When transparent object is in front it blends correctly. But it is visible through the opaque objects in the second picture.
Two more images where red is opaque and blue and green transparent. Green is visible through both transparent blue and opaque red in the second image.
I have reread my code hundreds of times and can’t find the issue. It is either I made a typo somewhere while following the guide, or the code in guide itself has a mistake somewhere.
I wonder if it’s possible to tell what could be the problem without pasting hundreds of lines of codes here.
GL Version: 4.6 (Core Profile) Mesa 22.1.6