WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-05-2013, 10:04 AM
whaleeee whaleeee is offline
Member
 
Join Date: Feb 2013
Posts: 5
Render Node View Matrix

Hello,
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 <node3d:renderNode>.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.

Thanks
Reply With Quote
  #2  
Old 05-06-2013, 08:36 AM
whaleeee whaleeee is offline
Member
 
Join Date: Feb 2013
Posts: 5
After further research, getMatrix returns the transform matrix, so the view matrix is the inverse of this?
Reply With Quote
  #3  
Old 05-06-2013, 09:26 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Yes, the view matrix will be the inverse.
Reply With Quote
Reply

Tags
render node, shader, shadows, view matrix

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up render node for shadowing whaleeee Vizard 2 05-06-2013 10:20 AM
Projection Matrix (onto oblique near plane) andrewjworz Vizard 1 07-13-2012 09:10 AM
To Masaki regarding render nodes surf3rguy Vizard 1 04-17-2012 05:37 PM
How to apply shader and render texture to an object whj Vizard 0 04-23-2010 12:23 PM
Documentation for coding a new render node? reedev Plug-in development 2 10-30-2008 10:06 AM


All times are GMT -7. The time now is 11:18 AM.


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