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/clay/shaders')
-rw-r--r--source/blender/draw/engines/clay/shaders/clay_frag.glsl14
-rw-r--r--source/blender/draw/engines/clay/shaders/clay_vert.glsl8
2 files changed, 0 insertions, 22 deletions
diff --git a/source/blender/draw/engines/clay/shaders/clay_frag.glsl b/source/blender/draw/engines/clay/shaders/clay_frag.glsl
index 7a38db35bcf..35d803dc9ef 100644
--- a/source/blender/draw/engines/clay/shaders/clay_frag.glsl
+++ b/source/blender/draw/engines/clay/shaders/clay_frag.glsl
@@ -62,13 +62,6 @@ vec3 get_view_space_from_depth(in vec2 uvcoords, in float depth)
}
}
-/* TODO remove this when switching to geometric normals */
-vec3 calculate_view_space_normal(in vec3 viewposition)
-{
- vec3 normal = cross(normalize(dFdx(viewposition)), dfdy_sign * normalize(dFdy(viewposition)));
- return normalize(normal);
-}
-
#ifdef USE_HSV
void rgb_to_hsv(vec3 rgb, out vec3 outcol)
{
@@ -168,13 +161,6 @@ void main() {
float depth = texture(depthtex, screenco).r;
vec3 position = get_view_space_from_depth(screenco, depth);
- vec3 normal = calculate_view_space_normal(position);
-
- /* Manual Depth test */
- /* Doing this test earlier gives problem with dfdx calculations
- * TODO move this before when we have proper geometric normals */
- if (gl_FragCoord.z > depth + 1e-5)
- discard;
#ifdef USE_ROTATION
/* Rotate texture coordinates */
diff --git a/source/blender/draw/engines/clay/shaders/clay_vert.glsl b/source/blender/draw/engines/clay/shaders/clay_vert.glsl
index 0b598ea0291..557445d5ef9 100644
--- a/source/blender/draw/engines/clay/shaders/clay_vert.glsl
+++ b/source/blender/draw/engines/clay/shaders/clay_vert.glsl
@@ -1,20 +1,12 @@
uniform mat4 ModelViewProjectionMatrix;
uniform mat3 NormalMatrix;
-#if __VERSION__ == 120
-attribute vec3 pos;
-attribute vec3 nor;
-varying vec3 normal;
-#else
in vec3 pos;
in vec3 nor;
out vec3 normal;
-#endif
-
void main()
{
normal = normalize(NormalMatrix * nor);
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
}
-