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

hdx: Fixes for 1d luts in HdxColorCorrectionTask #3419

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion pxr/imaging/hdx/colorCorrectionTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl(

// Sampler description
HgiSamplerDesc sampDesc;
sampDesc.debugName = samplerName;
sampDesc.magFilter =
interpolation == OCIO::Interpolation::INTERP_NEAREST ?
HgiSamplerFilterNearest : HgiSamplerFilterLinear;
Expand All @@ -453,9 +454,14 @@ HdxColorCorrectionTask::_CreateOpenColorIOResourcesImpl(
sampDesc.addressModeU = HgiSamplerAddressModeClampToEdge;
sampDesc.addressModeV = HgiSamplerAddressModeClampToEdge;

std::vector<float> lutVector = std::vector<float>(
lutValues,
lutValues + (valueCount * sizeof(float))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bounds calculation isn't correct, but only noticed after we started using the patch on Windows. I'll commit this once we've had a chance to use it a while.

Suggested change
lutValues + (valueCount * sizeof(float))
lutValues + valueCount

);

result->luts.emplace_back(
_TextureSamplerDesc{
texDesc, sampDesc, float4AdaptedLutValues});
texDesc, sampDesc, lutVector});
}

//
Expand Down