[osg-users] osgTerrain and CLAMP_TO_EDGE in ImageLayers?

Christian Buchner christian.buchner at gmail.com
Tue Sep 8 04:52:52 PDT 2015


Hi all,

I am questioning the hardcoded use for CLAMP_TO_EDGE texture wrapping modes
in the osgTerrain/GeometryTechnique.cpp.

Let's say that I wanted to add a high tes texture patch on some small
location on a terrain tile. The current CLAMP_TO_EDGE approach requires me
to modify the edge pixels of that terrain tile to have a transparent color.
So I basically lose these pixels.

I think it would be desirable to have the texture wrapping mode as a
configurable option in the osgTerrain::Layer base class, similar to how
currently the minLevel, maxLevel, minFilter and magFilter variables are
configurable there.

Preferable to me would be an approach using CLAMP_TO_BORDER where I can
define my own border color, for example to be fully transparent.

If this is an acceptable approach, I could submit a patch.

Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150908/55cbf429/attachment-0001.htm>


More information about the osg-users mailing list