Thread: [PyOpenGL-Users] ATI Card Flipping FBO Texture
Brought to you by:
mcfletch
From: Ian M. <geo...@gm...> - 2009-06-28 21:37:51
|
Hello, I have an NVidia GeForce 8400M GS. I have recently implemented an application that uses FBOs extensively. The application is available here: http://www.mediafire.com/download.php?z2xkwyjmmzm. It works excellently for me. It should look like: http://img7.imageshack.us/img7/6495/image1gsh.png. My friend, on an ATI Mobility Radeon HD 2300, is getting the texture vertically flipped: http://img3.imageshack.us/img3/3637/image2sle.png. I have no idea why it is happening. As a check, I had him manually flip the texture, which visually fixed the problem: vec2 coords = coord.st/coord.q; value = (coord.p/coord.q<=texture2D(shadtex,vec2(coords.x,1.0-coords.y)).r) ? 1.0:0.0; instead of: value = (coord.p/coord.q<=texture2DProj(shadtex,coord).r) ? 1.0:0.0; The issue is annoying me. How can it be "fixed" the real way--e.g., not a hack? Thanks, Ian |
From: Mads I. <mp...@co...> - 2009-06-29 18:51:01
|
Ian Mallett wrote: > Hello, > > I have an NVidia GeForce 8400M GS. I have recently implemented an > application that uses FBOs extensively. The application is available > here: http://www.mediafire.com/download.php?z2xkwyjmmzm. It works > excellently for me. It should look like: > http://img7.imageshack.us/img7/6495/image1gsh.png. My friend, on an > ATI Mobility Radeon HD 2300, is getting the texture vertically > flipped: http://img3.imageshack.us/img3/3637/image2sle.png. I have no > idea why it is happening. As a check, I had him manually flip the > texture, which visually fixed the problem: > vec2 coords = coord.st/coord.q <http://coord.st/coord.q>; > value = > (coord.p/coord.q<=texture2D(shadtex,vec2(coords.x,1.0-coords.y)).r) ? > 1.0:0.0; > instead of: > value = (coord.p/coord.q<=texture2DProj(shadtex,coord).r) ? 1.0:0.0; > The issue is annoying me. How can it be "fixed" the real way--e.g., > not a hack? > > Thanks, > Ian > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > vendor = GL.glGetString(GL.GL_VENDOR) if vendor == 'NVIDIA Corporation': ... elif vendor == 'ATI Technologies Inc.': ... But that's probably what you call a hack. Mads -- +------------------------------------------------------------+ | Mads Ipsen, Ph.D, Scientific software developer | +------------------------------+-----------------------------+ | QuantumWise A/S | phone: +45-29716388 | | Nørresøgade 27A | www: www.quantumwise.com | | DK-1370 Copenhagen, Denmark | email: mp...@qu... | +------------------------------+-----------------------------+ |
From: Ian M. <geo...@gm...> - 2009-06-29 20:13:34
|
That is what I'd call a hack, although that's what I'll end up doing if I can't find a better solution. Thanks, Ian |
From: Mike C. F. <mcf...@vr...> - 2009-06-29 21:27:04
|
Ian Mallett wrote: > Hello, > > I have an NVidia GeForce 8400M GS. I have recently implemented an > application that uses FBOs extensively. The application is available > here: http://www.mediafire.com/download.php?z2xkwyjmmzm. It works > excellently for me. It should look like: > http://img7.imageshack.us/img7/6495/image1gsh.png. My friend, on an > ATI Mobility Radeon HD 2300, is getting the texture vertically > flipped: http://img3.imageshack.us/img3/3637/image2sle.png. I have no > idea why it is happening. As a check, I had him manually flip the > texture, which visually fixed the problem: > vec2 coords = coord.st/coord.q <http://coord.st/coord.q>; > value = > (coord.p/coord.q<=texture2D(shadtex,vec2(coords.x,1.0-coords.y)).r) ? > 1.0:0.0; > instead of: > value = (coord.p/coord.q<=texture2DProj(shadtex,coord).r) ? 1.0:0.0; > The issue is annoying me. How can it be "fixed" the real way--e.g., > not a hack? To complicate your hack/workaround, I'm on a Mobility Radeon HD 3650 (Ubuntu Jaunty 9.04 AMD64 w/fglrx drivers) and the code renders perfectly. That is, just checking for vendor string doesn't sound like a solution. Afraid I don't know of any reason the flip would occur, so I don't have any real suggestions for how to fix it properly. You might be able to hack it by rendering a black/white texture and reading off a pixel result, but that seems... sub-optimal. Good luck, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |
From: Ian M. <geo...@gm...> - 2009-06-29 21:55:05
|
I can just see adding this option: "Shadows look funky?: Yes/No" |