Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add refract node #1698

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Minor updates to documentation
Signed-off-by: Jonathan Stone <jstone@lucasfilm.com>
  • Loading branch information
jstone-lucasfilm authored Feb 7, 2024
commit a696e0ac9bba7285504a6627ab4487d0ebbe1d81
11 changes: 5 additions & 6 deletions libraries/stdlib/stdlib_defs.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -2763,13 +2763,12 @@

<!--
Node: <refract>
Compute the refraction direction of an input vector against a normal vector.
The normal vector is assumed to be normalized.
Compute the refraction vector given an incident vector, unit surface normal, and index of refraction.
-->
<nodedef name="ND_refract_vector3" node="refract" nodegroup="math" doc="Compute the refraction direction of an input vector.">
<input name="in" type="vector3" value="1.0,0.0,0.0" doc="Input vector to be refracted." />
<input name="normal" type="vector3" defaultgeomprop="Nworld" doc="Normal vector." />
<input name="eta" type="float" value="1.0" doc="Ratio of the indices of refraction."/>
<nodedef name="ND_refract_vector3" node="refract" nodegroup="math" doc="Compute the refraction vector">
<input name="in" type="vector3" value="1.0, 0.0, 0.0" doc="Incident vector" />
<input name="normal" type="vector3" defaultgeomprop="Nworld" doc="Surface normal" />
<input name="eta" type="float" value="1.0" doc="Index of refraction" />
<output name="out" type="vector3" />
</nodedef>

Expand Down