Is there any way to restrict an object to a specific view port, say I have three for a triple head, but want an object to only appear in 2 of them, is there a shader call that can do that?
see the supported semantics:
hlsl:
// ********************************************************************************_
// —————————< SEMANTICS >———————————————————————————————————————————————————————
// ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
float4x4 tW : WORLD ; //————< object space -> world space>———————
//holds the transformation connected to the "Transform" pin.
//multiply the points of your mesh with that matrix
//so that you can transform meshes in space.
float4x4 tWI : WORLDINVERSE ;
float4x4 tWT : WORLDTRANSPOSE ;
float4x4 tWIT : WORLDINVERSETRANSPOSE ;
float4x4 tV : VIEW ; // world space -> view space
//this is the transformation you connected to the renderer at pin "View Transform".
//this matrix normally holds the position and orientation of the camera.
//multiply the points of your mesh to get them relative to the camera.
//still no distortion has taken place.
//after multiplication x goes right, y goes up and z goes into the monitor.
float4x4 tVI : VIEWINVERSE ;
float4x4 tVT : VIEWTRANSPOSE ;
float4x4 tVIT : VIEWINVERSETRANSPOSE ;
float4x4 tP : PROJECTION ; //view space -> projection space
//this is the transformation you connected to the renderer at pin "Projection Transform". it normally holds a perspective transformation.
//multiply the points of your mesh to distort them by a lens.
//after multiplication x and y values in between -1 and 1 are visible in the renderer.
// points wiht z=0 are in front (NearClipping Plane),
// points with z=1 are behind (Far Clipping Plane).
float4x4 tPI : PROJECTIONINVERSE ;
float4x4 tPT : PROJECTIONTRANSPOSE ;
float4x4 tPIT : PROJECTIONINVERSETRANSPOSE ;
float4x4 tWV : WORLDVIEW ; //world-view-matrix.
//shortcut to get from object space -> view space
//with one matrix multiplication *
float4x4 tWVI : WORLDVIEWINVERSE ;
float4x4 tWVT : WORLDVIEWTRANSPOSE ;
float4x4 tWVIT : WORLDVIEWINVERSETRANSPOSE ;
float4x4 tVP : VIEWPROJECTION ;
float4x4 tVPI : VIEWPROJECTIONINVERSE ;
float4x4 tVPT : VIEWPROJECTIONTRANSPOSE ;
float4x4 tVPIT : VIEWPROJECTIONINVERSETRANSPOSE ;
float4x4 tWVP : WORLDVIEWPROJECTION ; //object space -> projection space *
//very comfortable matrix to get points from the original mesh
//relative to the camera and also distorted by its lens.
float4x4 tWVPI : WORLDVIEWPROJECTIONINVERSE ;
float4x4 tWVPT : WORLDVIEWPROJECTIONTRANSPOSE ;
float4x4 tWVPIT : WORLDVIEWPROJECTIONINVERSETRANSPOSE ;
//if you don`t declare a world-matrix in your effect,
//but want to make use of any of the world-view-projection-matrices
//(those matrices you need a world-matrix for to calculate,
//like "worldview" or "worldviewprojection"),
//a matrix-pin for the world-matrix will automatically be added (the "Transform Pin")
//to your effectnode (with the identity matrix as default value).
float3 CamPosition : CAMERAPOSITION;
int VwPortIndex : VIEWPORTINDEX ;
int VwPortCount : VIEWPORTCOUNT ;
had a similar thread:
but stuck changing the shadercode
could someone post sample patch according joreg instructions?
maybe a clipping plane approach: http://legacy.vvvv.org/tiki-view_forum_thread.php?topics_offset=1&forumId=7&comments_parentId=28306
in case you dont have a spreaded viewport transform
After some head scratching…
thanks for the link DiMiX :)
and kalle, although that list still looks daunting!
Shader to Select whether an object is drawn in a viewport (2.7 kB)