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/modes/shaders/object_empty_image_frag.glsl')
-rw-r--r--source/blender/draw/modes/shaders/object_empty_image_frag.glsl53
1 files changed, 0 insertions, 53 deletions
diff --git a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl b/source/blender/draw/modes/shaders/object_empty_image_frag.glsl
deleted file mode 100644
index e33aa6cdcc1..00000000000
--- a/source/blender/draw/modes/shaders/object_empty_image_frag.glsl
+++ /dev/null
@@ -1,53 +0,0 @@
-
-flat in vec4 finalColor;
-
-#ifndef USE_WIRE
-in vec2 texCoord_interp;
-#endif
-
-out vec4 fragColor;
-
-#ifndef USE_WIRE
-uniform sampler2D image;
-uniform bool imagePremultiplied;
-#endif
-
-uniform int depthMode;
-uniform bool useAlphaTest;
-
-void main()
-{
-#ifdef USE_WIRE
- fragColor = finalColor;
-#else
- vec4 tex_col = texture_read_as_srgb(image, imagePremultiplied, texCoord_interp);
- fragColor = finalColor * tex_col;
-
- if (useAlphaTest) {
- /* Arbitrary discard anything below 5% opacity.
- * Note that this could be exposed to the User. */
- if (tex_col.a < 0.05) {
- discard;
- }
- else {
- fragColor.a = 1.0;
- }
- }
-#endif
-
- if (depthMode == DEPTH_BACK) {
- gl_FragDepth = 0.999999;
-#ifdef USE_WIRE
- gl_FragDepth -= 1e-5;
-#endif
- }
- else if (depthMode == DEPTH_FRONT) {
- gl_FragDepth = 0.000001;
-#ifdef USE_WIRE
- gl_FragDepth -= 1e-5;
-#endif
- }
- else if (depthMode == DEPTH_UNCHANGED) {
- gl_FragDepth = gl_FragCoord.z;
- }
-}