[osg-users] blending with shader

Gianni Ambrosio g.ambrosio+osg at gmail.com
Sun Oct 2 23:59:01 PDT 2016


Hi David,
thanks for your answer. Before reading it in detail I try to explain the overall scenario.

We have a curved screen where two (or threee) projectors must generare a unique picture.
I read a document about "Dynamic view dependent warping" and basically the operations to do are the following:
1) generate dynamic frusti
2) dynamic warping generation
3) blending

Code scenario.
A 3rd party software, that uses OSG inside, is responsible to generate the scene to be projected. And that would be enough for a single flat screen. But, as I told you, our screen is not flat and projectors are two or three. So we need to change something.
The 3rd party software allows to make such a change deriving from a Plugin base class with an interface like follows:

	virtual void config();
	virtual void update();
	virtual void preDraw(osg::Camera*);
	virtual void postDraw(osg::Camera*);

The Pluging is compiled in a dll and attached to the 3rd party software so that at runtime our implmentation is executed.

Now I need to implement points 1,2 and 3.
As far as I understood points 2 and 3 can be implemented with a shader.
I started asking point 3 that seems the easier just to understand how shaders work.

Hope this is clearer now.

Regards,
Gianni

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=68837#68837



-------------- next part --------------
A non-text attachment was scrubbed...
Name: dynwarp.png
Type: image/png
Size: 124609 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161003/6c36669d/attachment-0002.png>


More information about the osg-users mailing list