AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Code generation only works for PixelShader (Dx11) / Fragment Shader (OpenGL)
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 503
- PR merge metrics
- No merged PRs in 30d
Description
When performing lookup table sampling, OpenColorIO uses the following :
`outColor.r = ocio_lut1d_0.Sample(ocio_lut1d_0Sampler, ocio_lut1d_0_computePos(outColor.r)).r;`
This makes it impossible to use the generated code outside of a pixel shader, since in compute or other stages, we are not able to have automatic mip selection.
generated code should be :
`outColor.r = ocio_lut1d_0.SampleLevel(ocio_lut1d_0Sampler, ocio_lut1d_0_computePos(outColor.r),0).r;`
This is the same in OpenGL where we should enforce LOD = 0
This change should be for both 3d and 1d lookup textures.
I'm happy to make a PR if needed, if you prefer to avoid potential breaking changes, I'm also happy to make it as an Option in settings:
`shaderDesc->useLodSampling(true);
Thank
Julien
Contributor guide
Assessment
This issue has not been assessed yet.