Re: [osg-users] ShadowMapping on recent ATI - repost
I've fixed this behaviour too, by simply taking: gl_TexCoord[1].t = 1.0- clamp(dot( vec4(vVertPos,1.0), gl_EyePlaneT[1] ),0.0,1.0); instead of gl_TexCoord[1].t = clamp(dot( vec4(vVertPos,1.0), gl_EyePlaneT[1] ),0.0,1.0); in the vertex shader (yeah, I know the clamp is useless here, but since I've been debugging I tried almost everything ;-) ) thx a lot Sebastian Sebastian Messerschmidt schrieb: Hi Christian, I think i've seen your post on gamedev.net and tried to answer ...;-) Coincidence. Problem for me is, that even on 7.1 it's not working (but I've downgraded driver which might obscurify this issue a bit). I recently read some articles, where most of them were stating that binding LUMINANCE to FBOs isn't working properly ever since. Could you do me the favour and take a look at my screenies? If the issue should be related to flipped coordinates I could give it some tries into that direction. For now I remain a little clueless, since I cannot imagine other applications using shadowmapping in conjunction with FBOs won't suffer the same problems. Thanks for your answer however ... seems I'm not completly nuts at all ;-) cheers Sebastian Hi! I didn't look at your images, but I recently posted an issue that seems to be similar to yours... (title issues with latest ATI driver, please confirm) I'll quote the relevant part here: In my program, I use perspective shadow maps, rendering to a depth texture using setRenderTargetImplementation(FRAME_BUFFER_OBJECT). This works perfectly with driver version 7.9. In 8.1 however, it appears that the frame buffer image is flipped upside down for some reason. If I invert the y-coordinate for shadow texture lookup, everything works fine again for this driver version. Can anybody confirm these issues? I'm afraid now I'll have to implement a test of whether the frame buffer is flipped to maintain compatibility with the screwed-up ATI driver... I hope this is not the case... Nobody replied to this post yet, in the meantime I have implemented the workaround which tests the orientation of the image which is rendered to the FBO. Perhaps this is of any help regards chris ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ShadowMapping on recent ATI - repost
Sorry for wrong posting :-( Hello, I've encountered a very strange problem with osgShadow::ShadowMap. As I've posted before I have managed to write a perpixel shader that uses shadow mapping. And what shall I say: Works like a charme ... at least on a geForce 8600, X600, X1300 with older drivers. Until I tried it with a newer Catalyst driver ... this produced horribly wrong shadows. After debugging a bit and trying to get to the real problem I figured out, that the depthbuffer captured for the newer driver seems sort of warped so projecting this led to wrong shadowing. I have attached some links that illustrate the problem: This is the scene rendered with diffuse lighting: http://img209.imageshack.us/img209/246/grayscaleab8.jpg This is the result when I project the shadow texture via texture2D using GL_EYE_LINEAR gl_FragColor = texture2D(osgShadow_shadowTexture, gl_TexCoord[1].xy) * vec4(1.0,1.0,1.0,1.0); http://img84.imageshack.us/my.php?image=clipboard01rightsi6.jpg This is the result with the same shader on several other ATI-cards (FireGL, X1300, X1550 with newer Catalyst Drivers) http://img297.imageshack.us/my.php?image=wrongaz0.jpg If I use the drivers supplied with WinXP the result is correct however. I've also checked if texture coordinates calculated are correct and the are identical on all card/driver combinations. Since I've tested texture2D, texture2DProj as well as shadow2D and shadow2DProj and the results were always wrong for the ATI cards mentioned above I suspected the shadow-texture to be different. Has anyone a clue for me? I guess it could be the FBO/texture setup in the osgShadow implementation ... Any hints appreciated! cheers psy ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowMapping on recent ATI - repost
Hi! I didn't look at your images, but I recently posted an issue that seems to be similar to yours... (title issues with latest ATI driver, please confirm) I'll quote the relevant part here: In my program, I use perspective shadow maps, rendering to a depth texture using setRenderTargetImplementation(FRAME_BUFFER_OBJECT). This works perfectly with driver version 7.9. In 8.1 however, it appears that the frame buffer image is flipped upside down for some reason. If I invert the y-coordinate for shadow texture lookup, everything works fine again for this driver version. Can anybody confirm these issues? I'm afraid now I'll have to implement a test of whether the frame buffer is flipped to maintain compatibility with the screwed-up ATI driver... I hope this is not the case... Nobody replied to this post yet, in the meantime I have implemented the workaround which tests the orientation of the image which is rendered to the FBO. Perhaps this is of any help regards chris ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ShadowMapping on recent ATI - repost
Hi Christian, I think i've seen your post on gamedev.net and tried to answer ...;-) Coincidence. Problem for me is, that even on 7.1 it's not working (but I've downgraded driver which might obscurify this issue a bit). I recently read some articles, where most of them were stating that binding LUMINANCE to FBOs isn't working properly ever since. Could you do me the favour and take a look at my screenies? If the issue should be related to flipped coordinates I could give it some tries into that direction. For now I remain a little clueless, since I cannot imagine other applications using shadowmapping in conjunction with FBOs won't suffer the same problems. Thanks for your answer however ... seems I'm not completly nuts at all ;-) cheers Sebastian Hi! I didn't look at your images, but I recently posted an issue that seems to be similar to yours... (title issues with latest ATI driver, please confirm) I'll quote the relevant part here: In my program, I use perspective shadow maps, rendering to a depth texture using setRenderTargetImplementation(FRAME_BUFFER_OBJECT). This works perfectly with driver version 7.9. In 8.1 however, it appears that the frame buffer image is flipped upside down for some reason. If I invert the y-coordinate for shadow texture lookup, everything works fine again for this driver version. Can anybody confirm these issues? I'm afraid now I'll have to implement a test of whether the frame buffer is flipped to maintain compatibility with the screwed-up ATI driver... I hope this is not the case... Nobody replied to this post yet, in the meantime I have implemented the workaround which tests the orientation of the image which is rendered to the FBO. Perhaps this is of any help regards chris ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org