Hi Kris,
Seems to me that bottom line is (for simplicity lets define acronym STCI =
shadow tex coord index):
my search and replace method is dependent on currently selected STCI and
independent of shader source. It uses standard GLSL terms like
gl_MultiTexCoordSTCI, gl_TexCoord[ STCI ], etc for search and replace.
your method is independent of currently used STCI but depends on shader
source - It uses shader text excerpts surrounding STCI for search and
replace.
My point is following: guys do whatever you want with ShadowMap and
SoftShadowMap. But StandardShadowMap is a base class for a hierarchy of
derived classes. I have designed this class hierearchy to reuse as much of
common code through inheritance from ancestor techniques. One of derived
techniques could override shaders (adding soft shadowing for example) but I
don't want the coder to adjust search and replace strings each time shaders
are changed. Thats why I prefer to stay with current method which uses
existing index.
Btw, its not true that current index is not known. Its initially set to
default values used in default shaders (0:base 1:shadow). When indices in
default shader sources are changed, current indices used for search and
replace are changed as well. Next search and replace will run with new
values. This way texture coord index may stay consitent with the shaders.
If user wants to replace default shaders he should first change texture
coord index to the indices that new shaders use by default then change
shaders sources. If you had problem with this it could be related to the
order of unit and shader modifications done in reverse order.
And to agree again with You ;-): I don't want to continue this discussion
either. Its obvious to me that my usage scenarios are different than yours.
Lets Robert & J-S be the judge.
Cheers,
Wojtek
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org