Open BrendanO123 opened 1 month ago
The mipmap setting is now set to linear mipmap and nearest pixel, and the fragment shader now discards fragments with an alpha below an adjustable cut off. However, the transparent pixels on higher mipmap levels are still rendered as opaque, and the opaque (normal) pixels are still getting tinged towards black. I would like to figure out how to fix this color bleeding into the normal pixels, and the opacity bleeding into the transparent pixels. However, I am really not sure what to do about this.
I was just playing around with the FOV of the camera and I noticed that zooming out on leaves, grass, and flowers that where far away made them noticeably darker. It appears like the mipmap texture on the block is causing the fragment shader to return black (instead of discarding the fragment) for pixels on the leaves that should be transparent. On closer inspection, the same seems to be happening to the billboard blocks. I am really not sure what to do about this as the sprite map is already RGBA and in the call to
glTexImage2D()
in the main function it is set to also store the texture in RGBA. Additionally, the mipmap is set to nearest mipmap, nearest pixel so it shouldn't be blending in the other pixels anyway.