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 <bart.styczen@cine.dev>

Signed-off-by: Bart Styczen <bart.styczen@cine.dev>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
(cherry picked from commit d5cedbf)
  • Loading branch information
bartstyczen authored and cedrik-fuoco-adsk committed Jan 5, 2023
1 parent 505d794 commit d87c32e
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 d87c32e

Please sign in to comment.