http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Switch_by_Face&feed=atom&action=historyUnity Products:Amplify Shader Editor/Switch by Face - Revision history2024-03-29T05:39:25ZRevision history for this page on the wikiMediaWiki 1.40.1http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Switch_by_Face&diff=539&oldid=prevAmplifyWiki: 1 revision imported2023-12-02T00:06:13Z<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:06, 2 December 2023</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>AmplifyWikihttp://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Switch_by_Face&diff=538&oldid=prevampwiki>Amplify RnD Rick at 08:56, 25 August 20212021-08-25T08:56:39Z<p></p>
<p><b>New page</b></p><div>[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
<br />
== Switch by Face Node ==<br />
<br />
The Switch by Face outputs relays one of its inputs according to if the rendered surface is facing the camera ( [[#paramFront|Front]] ) or facing away from the camera ( [[#paramBack|Back]] ).<br />
<br/><br/><br />
'''NOTE:''' This node initially was only valid over fragment ports as it uses a face semantic over the fragment function signature to get the value. Now it also work on vertex ports but at the expense of additional instructions as it needs to be manually calculated and its not as precise as the one given by the face semantic.<br />
<br/><br />
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/SwitchByFaceNode.jpg"><br />
<br/><font size="1">Nodes used: <br />
[[Unity_Products:Amplify_Shader_Editor/Color|Color]], <br />
[[Unity_Products:Amplify_Shader_Editor/Switch_by_Face|Switch by Face]], <br />
[[Unity_Products:Amplify_Shader_Editor/Vector3|Vector3]], <br />
[[Unity_Products:Amplify_Shader_Editor/Float|Float]]<br />
</font><br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|-<br />
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value<br />
|- style="background: #e5e5e5;" |<br />
| id="paramFront" | Front<br />
| Value to be used on front faces. Only visible if the respective input port is not connected.<br />
| 0<br />
|- style="background: #e5e5e5;" |<br />
| id="paramBack" | Back<br />
| Value to be used on back faces. Only visible if the respective input port is not connected.<br />
| 0<br />
|}<br />
<br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|- <br />
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type<br />
|- <br />
| Front<br />
| Value to be used on front faces.<br />
| Float <sup id="ref1">[[#anchor|[1]]]</sup><br />
|- <br />
| Back<br />
| Value to be used on back faces.<br />
| Float <sup id="ref1">[[#anchor|[1]]]</sup><br />
|}<br />
<br />
----<br />
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.<br />
<br />
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
[[Category:Nodes]][[Category:Miscellaneous]]</div>ampwiki>Amplify RnD Rick