diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-11-15 14:15:02 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-11-16 17:43:46 +0300 |
commit | 0d5b291b741039f1a6c49000f7428eba6d5d94f8 (patch) | |
tree | c36b0c9bc66353f89139c54c77f2d7ff324b3792 /source/blender | |
parent | f6c2fb0eb62aa0a5535801e6358e148d10d349c3 (diff) |
Cleanup: removes unused varyings
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/background_vert.glsl | 7 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/default_world_frag.glsl | 13 |
2 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/background_vert.glsl b/source/blender/draw/engines/eevee/shaders/background_vert.glsl index c849a577316..380d6d96491 100644 --- a/source/blender/draw/engines/eevee/shaders/background_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/background_vert.glsl @@ -1,8 +1,6 @@ in vec2 pos; -out vec3 varposition; -out vec3 varnormal; out vec3 viewPosition; #ifndef VOLUMETRICS @@ -15,13 +13,12 @@ out vec3 viewNormal; void main() { gl_Position = vec4(pos, 1.0, 1.0); - varposition = viewPosition = vec3(pos, -1.0); - varnormal = normalize(-varposition); + viewPosition = vec3(pos, -1.0); #ifndef VOLUMETRICS /* Not used in practice but needed to avoid compilation errors. */ worldPosition = viewPosition; - worldNormal = viewNormal = varnormal; + worldNormal = viewNormal = normalize(-viewPosition); #endif #ifdef ATTRIB diff --git a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl index 1f0ef76da0c..19c23fbfa39 100644 --- a/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/default_world_frag.glsl @@ -1,19 +1,19 @@ -#define M_PI 3.14159265358979323846 - uniform float backgroundAlpha; +uniform vec3 color; + +out vec4 FragColor; + +#ifdef LOOKDEV uniform mat4 ProjectionMatrix; uniform mat4 ProjectionMatrixInverse; uniform mat4 ViewMatrixInverse; -#ifdef LOOKDEV uniform mat3 StudioLightMatrix; uniform sampler2D image; uniform float studioLightBackground = 1.0; in vec3 viewPosition; -#endif -uniform vec3 color; -out vec4 FragColor; +#define M_PI 3.14159265358979323846 void background_transform_to_world(vec3 viewvec, out vec3 worldvec) { @@ -46,6 +46,7 @@ void node_tex_environment_equirectangular(vec3 co, sampler2D ima, out vec4 color * texels. So we force the highest mipmap and don't do anisotropic filtering. */ color = textureLod(ima, vec2(u, v), 0.0); } +#endif void main() { #ifdef LOOKDEV |