[osg-users] dynamic cube map

Trajce Nikolov NICK trajce.nikolov.nick at gmail.com
Mon Dec 11 14:20:04 PST 2017


Hi Romulo,

more proper example is osgprerendercubemap - how to setup the RTT for
cubemaps. Then you can have a look again in the OpenIG project, in the
Triton plugin, line 70 - 114, that is the shader to generate HeighMap, for
your case instead of the world Z you put in the output Z from the camera
(the depth), and same for the normals. Here is the link for the code
snippet:

https://github.com/CCSI-CSSI/MuseOpenIG/blob/master/Plugin-Triton/IGPluginTriton.cpp

good luck ;-)

On Mon, Dec 11, 2017 at 8:19 PM, Trajce Nikolov NICK <
trajce.nikolov.nick at gmail.com> wrote:

> Hi Romulo,
>
> I guess you should do a render to texture and make sure the texture format
> is with texels as floating points. Then custom shaders that will render
> normals and depths into these textures.
>
> I am on travel at the moment will help you more when I get back. Meanwhile
> you can do research. Start with the osgprerender example
>
> On Dec 11, 2017 7:13 PM, "Rômulo Cerqueira" <romulogcerqueira at gmail.com>
> wrote:
>
>> Hi Nick,
>>
>> how can I encode the normal and depth data in the env texture?
>>
>> ...
>>
>> Thank you!
>>
>> Cheers,
>> Rômulo
>>
>> ------------------
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=72565#72565
>>
>>
>>
>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>


-- 
trajce nikolov nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20171211/ff9c49b1/attachment.html>


More information about the osg-users mailing list