Unity Products:Amplify Shader Editor/Camera Depth Fade and Unity Products:Amplify Shader Editor/Camera To World Matrix: Difference between pages
ampwiki>Amplify RnD Rick No edit summary |
ampwiki>Amplify RnD Rick No edit summary |
||
Line 1: | Line 1: | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
== Camera | == Camera To World Matrix Node == | ||
The Camera To World Matrix node returns something in the likes of the inverse view matrix which can be used to transform a position or direction from View to World space.<br/> | |||
This is ''in the likes'' as for rendering, view space's forward is -z and camera matrices matches the script component's matrices(+z forward). | |||
<br/><br/> | |||
'''NOTE 1:''' We advise using either the [[Unity_Products:Amplify_Shader_Editor/Transform_Position|Transform Position]] or [[Unity_Products:Amplify_Shader_Editor/Transform_Direction|Transform Direction]] as they are easier to use and you wont need to do an explicit multiplication between matrix and position/direction value. | |||
<br/> | |||
'''NOTE 2:''' This matrix for the time this documentation was created returned identity as it internally makes use of unity_CameraToWorld variable which isn't used by Unity's main rendering systems, only for post processing. For the current Inverse view Matrix you can use [[Unity_Products:Amplify_Shader_Editor/Inverse_View_Matrix|this]], node. | |||
<br/> | |||
<img class="responsive-img" src="http://wiki.amplify.pt/images/Nodes/CameraToWorldMatrix.jpg"> | |||
<br/><br/> | |||
{| class="wikitable" style="width: 100%;" | {| class="wikitable" style="width: 100%;" | ||
|- | |- | ||
! style="width: 10%;" | | ! style="width: 10%;" | Output Port !! Description !! style="width: 10%;" | Type | ||
|- | |- | ||
| | | Out | ||
| | | Returns current inverse camera to world matrix value. | ||
| Matrix4x4 | |||
| | |||
|} | |} | ||
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | [[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]] | ||
[[Category:Nodes]][[Category: | [[Category:Nodes]][[Category:Matrix Transform]] |
Revision as of 16:02, 24 August 2021
Camera To World Matrix Node
The Camera To World Matrix node returns something in the likes of the inverse view matrix which can be used to transform a position or direction from View to World space.
This is in the likes as for rendering, view space's forward is -z and camera matrices matches the script component's matrices(+z forward).
NOTE 1: We advise using either the Transform Position or Transform Direction as they are easier to use and you wont need to do an explicit multiplication between matrix and position/direction value.
NOTE 2: This matrix for the time this documentation was created returned identity as it internally makes use of unity_CameraToWorld variable which isn't used by Unity's main rendering systems, only for post processing. For the current Inverse view Matrix you can use this, node.
Output Port | Description | Type |
---|---|---|
Out | Returns current inverse camera to world matrix value. | Matrix4x4 |