forked from AcademySoftwareFoundation/MaterialX
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements to color transform handling
- Add support for a wider set of use cases for color space bindings, including surface shader nodes with filename-type inputs. - Add support for scoped color space bindings in shader translation. - Add a test suite example that covers newly-supported use cases. Supporting changes include: - Merge the protected method ShaderGraph::createSurfaceShader into ShaderGraph::create, allowing surface shader nodes to be handled in the same fashion as other nodes. - Update the interface of ShaderGraph::createNode, allowing greater flexibility in accessing parent nodes during shader generation. We've omitted a deprecated wrapper for this API update, as it would not be straightforward to write one in a memory-safe fashion, but fortunately this method only appears to be used within the ShaderGraph class.
- Loading branch information
1 parent
4cd0dcf
commit d634311
Showing
5 changed files
with
184 additions
and
313 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
resources/Materials/TestSuite/pbrlib/surfaceshader/network_surfaceshader.mtlx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38"> | ||
<nodedef name="ND_network_surface" node="network_surface"> | ||
<input name="base_color_filename" type="filename" value="" /> | ||
<output name="out" type="surfaceshader" /> | ||
</nodedef> | ||
<nodegraph name="NG_network_surface" nodedef="ND_network_surface"> | ||
<tiledimage name="base_color_image" type="color3"> | ||
<input name="file" type="filename" interfacename="base_color_filename" /> | ||
</tiledimage> | ||
<standard_surface name="standard_surface" type="surfaceshader"> | ||
<input name="base_color" type="color3" nodename="base_color_image" /> | ||
</standard_surface> | ||
<output name="out" type="surfaceshader" nodename="standard_surface" /> | ||
</nodegraph> | ||
<network_surface name="N_surfaceshader" type="surfaceshader"> | ||
<input name="base_color_filename" type="filename" value="resources/Images/grid.png" colorspace="srgb_texture" /> | ||
</network_surface> | ||
<surfacematerial name="N_surfacematerial" type="material"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="N_surfaceshader" /> | ||
</surfacematerial> | ||
</materialx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.