Skip to content

Commit

Permalink
Stubs for OSL and MDL turbulence noise
Browse files Browse the repository at this point in the history
Stubs for implementation of:
 - turbulence2d_float
 - turbulence3d_float
in OSL and MDL.
Currently returning a solid color. This is just to check the build warnings.
  • Loading branch information
zicher3d committed Mar 7, 2024
1 parent c66aba8 commit c3e00d5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@

<!-- <backface_util> todo: temporary implementation -->
<implementation name="IM_backface_util_genmdl" nodedef="adsk:ND_backface_util" sourcecode="color(1, 1, 1)" target="genmdl"/>

<implementation name="IM_turbulence2d_float_genmdl" nodedef="ND_turbulence2d_float" sourcecode="color(0.5, 0.5, 0.5)" target="genmdl" />
<implementation name="IM_turbulence3d_float_genmdl" nodedef="ND_turbulence3d_float" sourcecode="color(0.5, 0.5, 0.5)" target="genmdl" />

</materialx>
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@
-->
<!-- <backface_util> -->
<implementation name="IM_backface_util_genosl" nodedef="adsk:ND_backface_util" file="mx_backface_util.osl" function="mx_backface_util" target="genosl"/>

<implementation name="IM_turbulence2d_float_genosl" nodedef="ND_turbulence2d_float" file="mx_turbulence2d_float.osl" function="mx_turbulence2d_float" target="genosl" />
<implementation name="IM_turbulence3d_float_genosl" nodedef="ND_turbulence3d_float" file="mx_turbulence3d_float.osl" function="mx_turbulence3d_float" target="genosl" />

</materialx>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
void mx_turbulence2d_float(float amplitude, float octaves, vector2 texcoord, output float result)
{
result = 0.5;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
void mx_turbulence3d_float(float amplitude, float octaves, vector position, output float result)
{
result = 0.5;
}

0 comments on commit c3e00d5

Please sign in to comment.