Hi

There is no way unless you would re-calculate and set texcoord array each 
frame. You should compute texcoords for environment mapping in shader, or you 
can use fixed-pipeline for vertex processing(mean that you dont use vertex 
shader, only fragment), and in fragment shader use fixed pipeline generated 
texcoords to sample environment map. Drawback is that you can't use 
per-fragment lighting with this approach as fixed function processing 
calculates per-vertex lighting and dont supply normals to fragment shader.

Cheers,
Sergey.

01.08.2012, 14:53, "Aurelien Albert" <[email protected]>:
> Hi,
>
> I tried to load some models and display it with my home-made shader.
>
> It works well with a lot of model, but no with model which use environment 
> mapping texture.
>
> I don't want to write a special shader for these objects, so is there any way 
> to convert environment mapping to texture-coords mapping ?
>
> I think about a visitor which is applied on all geometry/stateset (I know how 
> to do that, I use it for other texture operation) but I don't know how to 
> generate regular texture coords equivalent to the environment mapping
>
> Thank you!
>
> Cheers,
> Aurelien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=49127#49127
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to