Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update documentation
Browse files Browse the repository at this point in the history
jstone-lucasfilm committed Dec 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7ece761 commit ac4a526
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/MaterialXGenGlsl/GlslShaderGenerator.cpp
Original file line number Diff line number Diff line change
@@ -591,7 +591,7 @@ void GlslShaderGenerator::emitPixelStage(const ShaderGraph& graph, GenContext& c
emitLineBreak(stage);
}

// Emit environment pre-convolution code
// Emit environment prefiltering code
if (context.getOptions().hwWriteEnvPrefilter)
{
emitLibraryInclude("pbrlib/genglsl/lib/mx_prefilter_environment.glsl", context, stage);
2 changes: 1 addition & 1 deletion source/MaterialXGenMsl/MslShaderGenerator.cpp
Original file line number Diff line number Diff line change
@@ -1059,7 +1059,7 @@ void MslShaderGenerator::emitPixelStage(const ShaderGraph& graph, GenContext& co
emitLineBreak(stage);
}

// Emit environment pre-convolution code
// Emit environment prefiltering code
if (context.getOptions().hwWriteEnvPrefilter)
{
emitLibraryInclude("pbrlib/genglsl/lib/mx_prefilter_environment.glsl", context, stage);
3 changes: 1 addition & 2 deletions source/MaterialXGenShader/GenOptions.h
Original file line number Diff line number Diff line change
@@ -175,8 +175,7 @@ class MX_GENSHADER_API GenOptions
/// Defaults to false.
bool hwWriteAlbedoTable;

/// Enables the generation of a prefiltered environment map, commonly called
/// the "LD" term in the split sum approximation.
/// Enables the generation of a prefiltered environment map.
/// Defaults to false.
bool hwWriteEnvPrefilter;

2 changes: 1 addition & 1 deletion source/MaterialXGenShader/HwShaderGenerator.cpp
Original file line number Diff line number Diff line change
@@ -362,7 +362,7 @@ ShaderPtr HwShaderGenerator::createShader(const string& name, ElementPtr element
psPrivateUniforms->add(Type::INTEGER, HW::T_ALBEDO_TABLE_SIZE, Value::createValue<int>(64));
}

// Add uniforms for the environment pre-convolution
// Add uniforms for environment prefiltering.
if (context.getOptions().hwWriteEnvPrefilter)
{
psPrivateUniforms->add(Type::FILENAME, HW::T_ENV_RADIANCE);
6 changes: 3 additions & 3 deletions source/MaterialXRender/Util.h
Original file line number Diff line number Diff line change
@@ -47,10 +47,10 @@ MX_RENDER_API ShaderPtr createAlbedoTableShader(GenContext& context,
DocumentPtr stdLib,
const string& shaderName);

/// Create a shader that generates a pre-convolution map for environment lighting.
/// Create a shader that generates a prefiltered environment map.
MX_RENDER_API ShaderPtr createEnvPrefilterShader(GenContext& context,
DocumentPtr stdLib,
const string& shaderName);
DocumentPtr stdLib,
const string& shaderName);

/// Create a blur shader, using the given standard libraries for code generation.
MX_RENDER_API ShaderPtr createBlurShader(GenContext& context,

0 comments on commit ac4a526

Please sign in to comment.