WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Render Node View Matrix (

whaleeee 05-05-2013 10:04 AM

Render Node View Matrix
I am trying to create shadowing effects using a depth map and a shader. My trouble now is getting the view matrix of my render node. If I do .getMatrix() is this the view matrix? The documentation is unclear and I am not sure how to verify this.

Also, what is the recommended method for passing this matrix into my vertex shader? The tutorial I am using says to store it in gl_TextureMatrix[1], but it is my impression that this matrix is read-only in GLSL. If I can use it, how do I set it in Vizard?

If I can't use gl_TextureMatrix[1], would I then have to use viz.addUniformFloat multiple times? addUniformFloat, I believe, only allows you to pass in a maximum of four float values.


whaleeee 05-06-2013 08:36 AM

After further research, getMatrix returns the transform matrix, so the view matrix is the inverse of this?

farshizzo 05-06-2013 09:26 AM

Yes, the view matrix will be the inverse.

All times are GMT -7. The time now is 10:21 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC