Commit: 8437519d0282e4d6ccb2f22d042bcaba2ac7d603 Author: Clément Foucault Date: Tue May 14 16:43:37 2019 +0200 Branches: master https://developer.blender.org/rB8437519d0282e4d6ccb2f22d042bcaba2ac7d603
Fix Shader compilation error on MacOS & some other platform/driver texture2D() is no longer supported by modern opengl, use texture() instead. =================================================================== M source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl M source/blender/draw/engines/gpencil/shaders/gpencil_point_frag.glsl M source/blender/draw/engines/gpencil/shaders/gpencil_stroke_frag.glsl M source/blender/draw/modes/shaders/object_empty_image_frag.glsl M source/blender/draw/modes/shaders/paint_texture_frag.glsl =================================================================== 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); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs