@ttyy wrote:
I'm loading a png with transparency and binding that to a 3d box.
When viewed from certain angles, the interior of the box is not seen through the transparent part of the texture - instead, the background is drawn.
This changes depending on the camera angle. I'm wondering if this has to do with depth testing and if there's a workaround?screenshots:
angle 1, interior occluded:
angle 2, bottom invisible:
my code:
ofEasyCam cam; ofImage png; void ofApp::setup(){ ofBackground(50); png.load("img.png"); ofEnableNormalizedTexCoords(); ofEnableDepthTest(); } void ofApp::draw(){ cam.begin(); png.bind(); ofDrawBox(100); png.unbind(); cam.end(); }
Posts: 2
Participants: 2