Hi J-S,

No, they won't be solid. As they are not solid in for trees drawn in island scene. But you have to use alpha ref. On the other hand if your transparency does not use alpha ref and sets Z-values it will still be solid even if color buffer would end transparent.

Alpha ref? What's that? (I'm showing my ignorance, but all I know is that our objects just have textures with alpha=0 for some texels - I don't know anything about alpha ref)


Sorry for being imprecise. By alpha ref I meant using osg::AlphaFunc to discard pixels with alpha lower or equal to reference value. I think that OpenGL default is 0.0.

So I must admit I don't exactly understand why turning blending may change depth values in shadow map. Maybe its not blending but override on rendering bins ? I use only one bin to render shadow map - is this the reason of your problems ?

It's true that I was oversimplifying. I always put blending and renderbin settings in the same bucket as normally they're used together... You're absolutely right, it's the renderbin override that causes the shadows of my chain link fences (and other objects with textures having some texels alpha=0) to be totally opaque.

So coming back to what you said above, what would be the right solution? Is there a way to fix our models so that I don't have to comment out the renderbin override in StandardShadowMap.cpp?

Otherwise, I'd submit a setter/getter control for that particular setting. It's necessary in our situation.


I see. Maybe AlphaFunc is selectively turned on by Transparent bins and turned off by Opaque bins and maybe thats why you see the difference when your StateSets do not have AlphaFunc set explicitly. I must admit that we usually set AlphaFunc in our datasbases thts probably the reason I have not noticed this problem yet.

Ok, now I think I understand - I will submit fix for this case or if You prefer you may do it. Basically we would want to add setter and getter for the flag which will turn off render bin override, right ?

Cheers,
Wojtek


_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to