Skip to content

Commit

Permalink
Use the updated HW Token in MaterialX 1.38.7
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-mcg committed Jul 7, 2023
1 parent 63fe8f8 commit aa8bca2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,13 @@ ShaderPtr GlslFragmentGenerator::generate(
_tokenSubstitutions[ShaderGenerator::T_FILE_TRANSFORM_UV]
= (context.getOptions().fileTextureVerticalFlip ? "mx_transform_uv_vflip.glsl"
: "mx_transform_uv.glsl");
#if MX_COMBINED_VERSION <= 13806
_tokenSubstitutions[HW::T_REFRACTION_ENV] = MX_REFRACTION_SUBSTITUTION;
#endif
#else
// Renamed in 1.38.7
_tokenSubstitutions[HW::T_REFRACTION_TWO_SIDED] = MX_REFRACTION_SUBSTITUTION;
#endif // <= 13806
#endif // <= 13804

// Add all functions for node implementations
emitFunctionDefinitions(graph, context, pixelStage);
Expand Down

0 comments on commit aa8bca2

Please sign in to comment.