Hi Baker,
My responses below.
Just for reference, the modifications I've made in my glsl shaders to get
it running on ATI were mainly the following:
- only index texture coordinates with constants, variables (even const)
don't seem to work.
- ensure all variables are initialized (sloppy on my part)
- hardcode to light 0, the accumulation loop did not work.
- don't use gl_FrontMaterial / gl_BackMaterial, as the values didn't work
as they did with nVidia, and produced unexpected values.
- don't use gl_FrontLightModelProduct, same reason as previous.
Thats the ATI. I stay with Catalyst 10.4. With 10.5 I had the issues you
show on osgshadow screenshots. 10.6 and 10.7 does not start on my machine.
Bombs with blue screen on startup. Thats maybe related to the fact that I
switched to dual GPU Radeon 5970. I saw on ATI forums that blue screens
happen on dual GPU Radeons.
I'm not using alpha in a nonstandard way (at least not intentionally),
and I don't use discard for anything. That's good information though, and
I will fiddle around with my shaders to see if they have any impact
(although with the NULL program, they shouldn't be used, eh?).
So having said that, the use of a NULL program indeed does seem like it
should be valid, as specified in the OpenGL 21.20061201 spec (p. 75), and
indeed OSG does call glUseProgram(0), which should revert to fixed
function. So this is a driver bug, right?
Still, I agree it might be useful to let the user provide a Program to
use, or whether to attach the NULL program.
I agree. However, its should be more generic to allow for modification of
other StateAttributes as well. Some callback maybe... Currently the only
option is overriding technique & its internal ViewData class (which is bit
tricky but I think I have posted 'how to do it' on the forum).
I ran osgshadow on the ATI 4670 with the 10.7 drivers, and I'll post the
results below. I'm also attaching a screenshot of the vehicle in
osgviewerWX, which seems to be having some texture coordinate issues
(again, fine on nVidia). Hmm, even the osg cow seems wrong.
I don't know precisely what the Texture Matrix fix is that you're
speaking about, but I can poke around the forums and see if I find the
issue.
There is a line in Main Vertex Shader where tex coords at index zero 0 are
computed:
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TextureMatrix seems to be initialized to 0 on ATI Catalyst 10.4 and
resulting tex coords are always 0.
Workaround for this is to either comment out gl_TextureMatrix[0]
multiplication in this shader or set up identity osg::TexMat at the scene
root state set.
With above change I am fairly happy on 10.4. So I recommend you try these
drivers. For my laptop with really old ATi XPress 1200 I use Catalyst 10.2
and these drivers seem to be even better because osgshadow works without any
modifications. I must be honest with you though. I actually have two cards
on my Windows 7 one NVidia 8800 and Radeon 5970. And NVidia is most of the
time the card of choice for OpenGL. So I maybe shoud not say I do lots of
extensive testing on the Radeon. I switch to it when I want to check code
compatibilty.
As I wrote earlier I am not able to get 10.6 and 10.7 to start up. But I
have earlier tried 10.5 and they showed the same problems with texture that
looked like your screenshots. We discussed this on the osg-forum couple
weeks ago (http://forum.openscenegraph.org/viewtopic.php?p=29501#29501) So
you may consider giving 10.4 or earlier drivers second chance ;-)
And by the way, thanks for the lispsm submission, it's really well done!
I am happy when people use it ;-)
Cheers,
Wojtek
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org