AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
Add ability to perform output color transformation as part of shader generation
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 451
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 5
Description
This is a proposal to add in the ability for shader generation to "append" an output transform as part of
code generation. In general this would be for a display transform to be applied such as rendering color space to
display space.
Currently, the only support is for input color space to rendering color space.
As a simple example a `lin_rec709` to `srgb_texture` injection would be useful for hardware rendering. Especially so in the case
where currently a hardware sRGB buffer is being used but may not be available. ( Note: Currently this approach allows for a lower
resolution output buffer as the transform is done before writing the pixel to the output buffer. )
The proposed option would live on GenOptions.
If reusable shaders were exposed as definitions then it would also be useful for an alternative approach of performing the transform after rendering, though the buffer rendered to would need to be high enough precision to quantization issues.
Contributor guide
Research direction
Start by locating GenOptions and the shader-generation entry points, then trace how input color-space transforms are currently represented. Compare the proposed output-transform path with the existing input-transform flow and determine how reusable shader definitions would fit. Done means the design and implementation support an output transform such as lin_rec709 to srgb_texture without relying on a hardware sRGB buffer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100