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

Expose names of transforms for UDIM texture atlases #1274

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions source/MaterialXGenShader/Nodes/HwImageNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
namespace MaterialX
{
// Additional implementaton arguments for image nodes
const string UV_SCALE = "uv_scale";
const string UV_OFFSET = "uv_offset";
string HwImageNode::UV_SCALE = "uv_scale";
string HwImageNode::UV_OFFSET = "uv_offset";

ShaderNodeImplPtr HwImageNode::create()
{
Expand Down
6 changes: 6 additions & 0 deletions source/MaterialXGenShader/Nodes/HwImageNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ class MX_GENSHADER_API HwImageNode : public HwSourceCodeNode

void addInputs(ShaderNode& node, GenContext& context) const override;
void setValues(const Node& node, ShaderNode& shaderNode, GenContext& context) const override;

// Aguments which may be added as part of the signature for image nodes
// to allow for additional texture coordinate transformations.
// Currently these are added to support UDIM texture atlas lookup.
static string UV_SCALE;
static string UV_OFFSET;
};

} // namespace MaterialX
Expand Down