forked from bartvdbraak/blender
OCIO: use modern GLSL texture functions
small part of ongoing OpenGL upgrade
This commit is contained in:
parent
cc830e2586
commit
17f26e181f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user