Skip to content

Commit

Permalink
Add up-axis option to triplanarprojection (AcademySoftwareFoundation#…
Browse files Browse the repository at this point in the history
…1489)

Improves usability by letting artists pick an up axis, and therefore which axes are aligned side-by-side. This is useful for textures with a horizontal alignment, such as bricks.

The default is "Z", which gives the same visual appearance as the current default.
  • Loading branch information
crydalch authored Aug 28, 2023
1 parent 18d7ef9 commit c97993e
Show file tree
Hide file tree
Showing 2 changed files with 228 additions and 18 deletions.
6 changes: 6 additions & 0 deletions libraries/stdlib/stdlib_defs.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@
<input name="default" type="float" value="0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand All @@ -324,6 +325,7 @@
<input name="default" type="color3" value="0.0, 0.0, 0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand All @@ -341,6 +343,7 @@
<input name="default" type="color4" value="0.0, 0.0, 0.0, 0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand All @@ -358,6 +361,7 @@
<input name="default" type="vector2" value="0.0, 0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand All @@ -375,6 +379,7 @@
<input name="default" type="vector3" value="0.0, 0.0, 0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand All @@ -392,6 +397,7 @@
<input name="default" type="vector4" value="0.0, 0.0, 0.0, 0.0" />
<input name="position" type="vector3" defaultgeomprop="Pobject" />
<input name="normal" type="vector3" defaultgeomprop="Nobject" />
<input name="upaxis" type="integer" value="2" enum="X,Y,Z" enumvalues="0,1,2" uniform="true" />
<input name="blend" type="float" value="1.0" uimin="0.0" uimax="1.0" />
<input name="filtertype" type="string" value="linear" enum="closest,linear,cubic" uniform="true" />
<input name="framerange" type="string" value="" uniform="true" />
Expand Down
Loading

0 comments on commit c97993e

Please sign in to comment.