<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
I'm experimenting with slave cameras for a while now and now I'm
totally stuck.<br>
I'm doing a tiled display of a scene and for the main scene graph it
works fine with projection offset matrix on the slave cameras<br>
and all cameras having a RELATIVE reference frame.<br>
But my scene also has cameras with ABSOLUTE reference frame (i.e. a
background image).<br>
The background is - of course - fully mapped on each tile.<br>
<br>
In order to solve this I modified my vertex shader like that:<br>
<br>
<span style=" color:#c0c0c0;"> </span> gl_Position<span style="
color:#c0c0c0;"> </span>=<span style=" color:#c0c0c0;"> </span>osg_ModelViewProjectionMatrix<span
style=" color:#c0c0c0;"> </span>*<span style=" color:#c0c0c0;"> </span>projectionOffsetMatrix<span
style=" color:#c0c0c0;"> </span>*<span style=" color:#c0c0c0;"> </span>osg_Vertex;
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
and I populate the projection offset matrix via uniform (same as
slave offset matrix). Unfortunately without the expected success.<br>
<br>
For creation of osg_ModelViewPrtojectionMatrix I found this code:<br>
<br>
osg::Matrixd modelViewProjectionMatrix = modelMatrix *
viewMatrix * _camera-><span class="pl-c1">getProjectionMatrix</span>();<br>
uniform-><span class="pl-c1">set</span>(modelViewProjectionMatrix);<br>
<br>
And in the updateSlaveImplementatiuon I see:<br>
<br>
<span style=" color:#c0c0c0;"> </span>
_camera->setProjectionMatrix(view.getCamera()->getProjectionMatrix()
* _projectionOffset);<br>
<br>
So where is my mistake? It should be obvious but it seems I'm blind
here.<br>
<br>
Many thanks<br>
<br>
- Werner -<br>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">
</pre>
<br>
<br>
<br>
<br>
<br>
</body>
</html>