Skip to content

Commit

Permalink
Merge branch 'main' into struct_experiment_dont_unfold
Browse files Browse the repository at this point in the history
  • Loading branch information
jstone-lucasfilm authored Jun 1, 2024
2 parents b04f9ca + 24d7e0d commit 9ca2b71
Show file tree
Hide file tree
Showing 8 changed files with 104 additions and 97 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Added support for [Python 3.12](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1802) in Python wheel generation.
- Added support for the [full set of shader generators](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1771) in JavaScript.
- Added an example script to [generate a MaterialX document](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1746) from a folder of textures.
- Added support for [frame timing](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1739) in the MaterialX Viewer.
- Added unit tests for [core utilities](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1768) and [ESSL shader generation](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1781).

### Changed
Expand All @@ -20,6 +21,7 @@
- Extended the [switch node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1660) to ten inputs in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Renamed the inputs of the [atan2 node](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1659) in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Renamed the [normalmap nodedef](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1677) in MaterialX 1.39, with automatic upgrade logic for legacy documents.
- Optimized [Fresnel](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1732) [computations](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1733) in [GLSL](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1736), improving the performance of physically based shading in real-time renders.
- Applied [lossless optimization](https://github.com/AcademySoftwareFoundation/MaterialX/pull/1738) to PNG and JPG textures in the MaterialX repository.

### Removed
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXCore/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ void NodeGraph::removeInterfaceName(const string& inputPath)
ElementPtr interfacePort = interface->getChild(interfaceName);
if (interfacePort)
{
InputPtr interfaceInput = interfacePort ? interfacePort->asA<Input>() : nullptr;
InputPtr interfaceInput = interfacePort->asA<Input>();
if (interfaceInput && interfaceInput->hasValue())
{
input->setValueString(interfaceInput->getValueString());
Expand Down
2 changes: 1 addition & 1 deletion source/MaterialXCore/Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ void Document::upgradeVersion()
continue;
}

string channelString = port ? port->getAttribute("channels") : EMPTY_STRING;
const string& channelString = port->getAttribute("channels");
if (channelString.empty())
{
continue;
Expand Down
4 changes: 2 additions & 2 deletions source/MaterialXGenMdl/mdl/materialx/core.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ export struct mx_separate4_vector4_type { float outx = 0.0; float outy = 0.0; fl
export float2 mx_swizzle_xy( float2 a) { return float2( a.x, a.y); }
export float2 mx_swizzle_xy( float3 a) { return float2( a.x, a.y); }
export float2 mx_swizzle_xy( float4 a) { return float2( a.x, a.y); }
export float2 mx_swizzle_xy( color a) { return xy( float3(a)); }
export float2 mx_swizzle_xy( core::color4 a) { return xy( float3( a.rgb)); }
export float2 mx_swizzle_xy( color a) { return mx_swizzle_xy( float3(a)); }
export float2 mx_swizzle_xy( color4 a) { return mx_swizzle_xy( float3( a.rgb)); }

// Enum for blur filter type, instead of string
export enum mx_filter_type {
Expand Down
8 changes: 4 additions & 4 deletions source/MaterialXGenMdl/mdl/materialx/noise.mdl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ int3 mx_hash_int3(int mxp_x, int mxp_y, int mxp_z)
}

export float mx_perlin_noise_float(
float2 mxp_p = mx_swizzle_xy( ::state::texture_coordinate(0)))
float2 mxp_p = core::mx_swizzle_xy( ::state::texture_coordinate(0)))
[[
anno::noinline()
]]
Expand All @@ -274,7 +274,7 @@ export float mx_perlin_noise_float(
}

export float3 mx_perlin_noise_float3(
float2 mxp_p = mx_swizzle_xy( ::state::texture_coordinate(0)))
float2 mxp_p = core::mx_swizzle_xy( ::state::texture_coordinate(0)))
[[
anno::noinline()
]]
Expand Down Expand Up @@ -368,7 +368,7 @@ export float mx_cell_noise_float(float mxp_p)
}

export float mx_cell_noise_float(
float2 mxp_p = mx_swizzle_xy( ::state::texture_coordinate(0)))
float2 mxp_p = core::mx_swizzle_xy( ::state::texture_coordinate(0)))
[[
anno::noinline()
]]
Expand Down Expand Up @@ -416,7 +416,7 @@ export float3 mx_cell_noise_float3(float mxp_p)
}

export float3 mx_cell_noise_float3(
float2 mxp_p = mx_swizzle_xy( ::state::texture_coordinate(0)))
float2 mxp_p = core::mx_swizzle_xy( ::state::texture_coordinate(0)))
[[
anno::noinline()
]]
Expand Down
Loading

0 comments on commit 9ca2b71

Please sign in to comment.