Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_image_linear_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_linear_frag.glsl33
1 files changed, 0 insertions, 33 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_image_linear_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_linear_frag.glsl
deleted file mode 100644
index e6acdd446d3..00000000000
--- a/source/blender/gpu/shaders/gpu_shader_image_linear_frag.glsl
+++ /dev/null
@@ -1,33 +0,0 @@
-
-/* Display a linear image texture into sRGB space */
-
-uniform sampler2D image;
-
-in vec2 texCoord_interp;
-
-out vec4 fragColor;
-
-float linearrgb_to_srgb(float c)
-{
- if (c < 0.0031308) {
- return (c < 0.0) ? 0.0 : c * 12.92;
- }
- else {
- return 1.055 * pow(c, 1.0 / 2.4) - 0.055;
- }
-}
-
-void linearrgb_to_srgb(vec4 col_from, out vec4 col_to)
-{
- col_to.r = linearrgb_to_srgb(col_from.r);
- col_to.g = linearrgb_to_srgb(col_from.g);
- col_to.b = linearrgb_to_srgb(col_from.b);
- col_to.a = col_from.a;
-}
-
-void main()
-{
- fragColor = texture(image, texCoord_interp.st);
-
- linearrgb_to_srgb(fragColor, fragColor);
-}