[Bf-blender-cvs] [17f26e181fe] blender2.8: OCIO: use modern GLSL texture functions

Mike Erwin noreply at git.blender.org
Wed Aug 30 19:34:10 CEST 2017


Commit: 17f26e181febbc72b873131c40bea6d508264641
Author: Mike Erwin
Date:   Wed Aug 30 13:19:59 2017 -0400
Branches: blender2.8
https://developer.blender.org/rB17f26e181febbc72b873131c40bea6d508264641

OCIO: use modern GLSL texture functions

small part of ongoing OpenGL upgrade

===================================================================

M	intern/opencolorio/gpu_shader_display_transform.glsl

===================================================================

diff --git a/intern/opencolorio/gpu_shader_display_transform.glsl b/intern/opencolorio/gpu_shader_display_transform.glsl
index 372d41dfecb..ae0c524300d 100644
--- a/intern/opencolorio/gpu_shader_display_transform.glsl
+++ b/intern/opencolorio/gpu_shader_display_transform.glsl
@@ -12,7 +12,6 @@ uniform float image_texture_height;
 
 in vec2 texCoord_interp;
 out vec4 fragColor;
-#define texture2D texture
 
 #ifdef USE_CURVE_MAPPING
 /* Curve mapping parameters
@@ -42,7 +41,7 @@ float read_curve_mapping(int table, int index)
 	 *               But is it actually correct to subtract 1 here?
 	 */
 	float texture_index = float(index) / float(curve_mapping_lut_size  - 1);
-	return texture1D(curve_mapping_texture, texture_index)[table];
+	return texture(curve_mapping_texture, texture_index)[table];
 }
 
 float curvemap_calc_extend(int table, float x, vec2 first, vec2 last)
@@ -147,7 +146,7 @@ vec4 apply_dither(vec2 st, vec4 col)
 
 void main()
 {
-	vec4 col = texture2D(image_texture, texCoord_interp.st);
+	vec4 col = texture(image_texture, texCoord_interp.st);
 #ifdef USE_CURVE_MAPPING
 	col = curvemapping_evaluate_premulRGBF(col);
 #endif



More information about the Bf-blender-cvs mailing list