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/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl
index f4b6201e503..eb64947999e 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_zdepth_mix_frag.glsl
@@ -8,18 +8,22 @@ uniform int tonemapping;
float srgb_to_linearrgb(float c)
{
- if (c < 0.04045)
+ if (c < 0.04045) {
return (c < 0.0) ? 0.0 : c * (1.0 / 12.92);
- else
+ }
+ else {
return pow((c + 0.055) * (1.0 / 1.055), 2.4);
+ }
}
float linearrgb_to_srgb(float c)
{
- if (c < 0.0031308)
+ if (c < 0.0031308) {
return (c < 0.0) ? 0.0 : c * 12.92;
- else
+ }
+ else {
return 1.055 * pow(c, 1.0 / 2.4) - 0.055;
+ }
}
void main()