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

gpu_shader_2D_widget_shadow_frag.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a624d3f2f8b1fd8a51fe705255de17fb08ab04b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

#ifndef USE_GPU_SHADER_CREATE_INFO
in float shadowFalloff;

out vec4 fragColor;

uniform float alpha;
#endif

void main()
{
  fragColor = vec4(0.0);
  /* Manual curve fit of the falloff curve of previous drawing method. */
  fragColor.a = alpha * (shadowFalloff * shadowFalloff * 0.722 + shadowFalloff * 0.277);
}