AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Code generation only works for PixelShader (Dx11) / Fragment Shader (OpenGL)
- 主要言語
- C++
- スター
- 2.1k
- フォーク
- 503
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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
コントリビューションガイド
調査の方向性
まず、DirectX および OpenGL バックエンドで 1D および 3D のルックアップテクスチャサンプリングに使用される生成済みシェーダーコードを探します。現在のサンプリング式を、要求されている明示的な LOD 0 の動作と比較し、その後、生成されたコードが自動的な mip 選択なしで compute およびその他の非ピクセルステージをサポートしていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100