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_font_frag.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_font_frag.glsl11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_font_frag.glsl b/source/blender/gpu/shaders/gpu_shader_font_frag.glsl
new file mode 100644
index 00000000000..213b370580f
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_font_frag.glsl
@@ -0,0 +1,11 @@
+varying vec4 varying_color;
+varying vec2 varying_texcoord;
+
+void main()
+{
+#ifdef GPU_PROFILE_CORE
+ gl_FragColor = vec4(varying_color.rgb, texture2D(b_Sampler2D[0], varying_texcoord).r * varying_color.a);
+#else
+ gl_FragColor = vec4(varying_color.rgb, texture2D(b_Sampler2D[0], varying_texcoord).a * varying_color.a);
+#endif
+}