diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 17:43:37 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 17:43:37 +0300 |
commit | 8437519d0282e4d6ccb2f22d042bcaba2ac7d603 (patch) | |
tree | f29372aefbeb3f9f01b64ca8885c685312d10a93 /source/blender/draw | |
parent | 3db428406f69358f7bc81e8f757f733338236a29 (diff) |
Fix Shader compilation error on MacOS & some other platform/driver
texture2D() is no longer supported by modern opengl, use texture() instead.
Diffstat (limited to 'source/blender/draw')
5 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl index 80fae9ab518..192720a4e98 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl @@ -103,7 +103,7 @@ vec4 texture_read_as_srgb(sampler2D tex, vec2 co) { /* By convention image textures return scene linear colors, but * grease pencil still works in srgb. */ - vec4 color = texture2D(tex, co); + vec4 color = texture(tex, co); color.r = linearrgb_to_srgb(color.r); color.g = linearrgb_to_srgb(color.g); color.b = linearrgb_to_srgb(color.b); diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl index 98c47b1f1f0..569a68679b4 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl @@ -61,7 +61,7 @@ vec4 texture_read_as_srgb(sampler2D tex, vec2 co) { /* By convention image textures return scene linear colors, but * grease pencil still works in srgb. */ - vec4 color = texture2D(tex, co); + vec4 color = texture(tex, co); color.r = linearrgb_to_srgb(color.r); color.g = linearrgb_to_srgb(color.g); color.b = linearrgb_to_srgb(color.b); diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl index 6b3fcad1240..a5580e305d6 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl @@ -41,7 +41,7 @@ vec4 texture_read_as_srgb(sampler2D tex, vec2 co) { /* By convention image textures return scene linear colors, but * grease pencil still works in srgb. */ - vec4 color = texture2D(tex, co); + vec4 color = texture(tex, co); color.r = linearrgb_to_srgb(color.r); color.g = linearrgb_to_srgb(color.g); color.b = linearrgb_to_srgb(color.b); diff --git a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl index dbc403dc39b..deb82a8904e 100644 --- a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl +++ b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl @@ -28,7 +28,7 @@ vec4 texture_read_as_srgb(sampler2D tex, vec2 co) { /* By convention image textures return scene linear colors, but * overlays still assume srgb. */ - vec4 color = texture2D(tex, co); + vec4 color = texture(tex, co); color.r = linearrgb_to_srgb(color.r); color.g = linearrgb_to_srgb(color.g); color.b = linearrgb_to_srgb(color.b); diff --git a/source/blender/draw/modes/shaders/paint_texture_frag.glsl b/source/blender/draw/modes/shaders/paint_texture_frag.glsl index 5d74213a445..4a3c5cb430c 100644 --- a/source/blender/draw/modes/shaders/paint_texture_frag.glsl +++ b/source/blender/draw/modes/shaders/paint_texture_frag.glsl @@ -30,7 +30,7 @@ vec4 texture_read_as_srgb(sampler2D tex, vec2 co) { /* By convention image textures return scene linear colors, but * overlays still assume srgb. */ - vec4 color = texture2D(tex, co); + vec4 color = texture(tex, co); color.r = linearrgb_to_srgb(color.r); color.g = linearrgb_to_srgb(color.g); color.b = linearrgb_to_srgb(color.b); |