Skip to content

Commit

Permalink
Hydrogent: fixed sRGB textures handling
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Mar 30, 2024
1 parent 1e4ea87 commit 425451c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Hydrogent/src/HnMaterialNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ HnSubTextureIdentifier GetSubtextureIdentifier(const pxr::TfToken& Pa
}
else if (SourceColorSpace == "auto")
{
//TextureId.IsSRGB = ParamName == HnTokens->diffuseColor;
TextureId.IsSRGB = ParamName == HnTokens->diffuseColor || ParamName == HnTokens->emissiveColor;
}

if (TextureType == pxr::HdTextureType::Uv)
Expand Down
3 changes: 3 additions & 0 deletions Hydrogent/src/HnRenderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ static std::shared_ptr<USD_Renderer> CreateUSDRenderer(const HnRenderDelegate::C

USDRendererCI.AllowHotShaderReload = RenderDelegateCI.AllowHotShaderReload;

// We use SRGB textures, so color conversion in the shader is not needed
USDRendererCI.TexColorConversionMode = PBR_Renderer::CreateInfo::TEX_COLOR_CONVERSION_MODE_NONE;

USDRendererCI.MaxLightCount = RenderDelegateCI.MaxLightCount;
USDRendererCI.EnableShadows = RenderDelegateCI.EnableShadows;
USDRendererCI.PCFKernelSize = RenderDelegateCI.PCFKernelSize;
Expand Down

0 comments on commit 425451c

Please sign in to comment.