Skip to content

Commit

Permalink
replace texture2D function with texture for GLSL 1.3 (#1723)
Browse files Browse the repository at this point in the history
Signed-off-by: Bart Styczen <[email protected]>

Signed-off-by: Bart Styczen <[email protected]>
Co-authored-by: Doug Walker <[email protected]>
(cherry picked from commit d5cedbf)
Signed-off-by: Cédrik Fuoco <[email protected]>
  • Loading branch information
2 people authored and cedrik-fuoco-adsk committed Jan 5, 2023
1 parent f840905 commit a5b91ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/OpenColorIO/GpuShaderUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ std::string getTexSample(GpuLanguage lang,
switch (lang)
{
case GPU_LANGUAGE_GLSL_1_2:
case GPU_LANGUAGE_GLSL_1_3:
{
kw << "texture" << N << "D(" << samplerName << ", " << coords << ")";
break;
}
case GPU_LANGUAGE_GLSL_1_3:
{
kw << "texture(" << samplerName << ", " << coords << ")";
break;
}
case GPU_LANGUAGE_GLSL_ES_1_0:
{
if (N == 1) {
Expand Down

0 comments on commit a5b91ce

Please sign in to comment.