Hi.
Thanks for the info. I'm now using shaders to process depth:
1) vertex: http://goo.gl/G9ehmB
2) fragment: http://goo.gl/bAutb1
As you see, I'm trying to output depth texture in world space using 'vmi'
(view matrix inverse) which I apply later in the 2nd pass.
vmi setup: http://goo.gl/n3A84N
However, when I start the program, it prints 2 errors:
1) Cannot assign between Uniform types dmat4 or mat4 and int
    at:
uniform->set(osg::Matrix::inverse(pass1LightDepthSRTTCamera->getViewMatrix()));
call
2) Warning: detected OpenGL error 'invalid operation' at After
Renderer::compile
    at: mat4 modelMatrix = vmi * gl_ModelViewMatrix;

I took the uniform setup code from osgUtil::SceneView: http://goo.gl/6OvdLr
So I really don't understand what I'm doing wrong. Any help?

Thanks.



2013/10/10 Marcel Pursche <[email protected]>

> Hi,
>
> your other buffers use the rectangle format. This texture format can be
> accesed with unormalized coordinates [0, texturesize]. Regular 2D textures
> need to be accessed with normalized texture coordinates [0, 1].
>
> Thank you!
>
> Cheers,
> Marcel
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=56731#56731
>
>
>
>
>
> _______________________________________________
> 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