diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-06-02 14:02:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-06-02 22:16:40 +0300 |
commit | 98e4d548a16c6533eadbe619f78cf1dda1a5c7a4 (patch) | |
tree | faa3c46f400afa969271ea7083601c691834b45b /source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | |
parent | 119423b252c405b674c790b85962e5321882a9f4 (diff) |
Eevee: Hair: Make SSR works with hairs.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl index daeef1dbf01..4e65834e528 100644 --- a/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/lit_surface_frag.glsl @@ -178,21 +178,6 @@ void CLOSURE_NAME( vec4 rand = texelFetch(utilTex, ivec3(ivec2(gl_FragCoord.xy) % LUT_SIZE, 2.0), 0); -#ifdef HAIR_SHADER - vec3 B = normalize(cross(worldNormal, hairTangent)); - float cos_theta; - if (hairThicknessRes == 1) { - /* Random cosine normal distribution on the hair surface. */ - cos_theta = rand.x * 2.0 - 1.0; - } - else { - /* Shade as a cylinder. */ - cos_theta = hairThickTime / hairThickness; - } - float sin_theta = sqrt(max(0.0, 1.0f - cos_theta*cos_theta));; - N = normalize(N * sin_theta + B * cos_theta); -#endif - /* ---------------------------------------------------------------- */ /* -------------------- SCENE LAMPS LIGHTING ---------------------- */ /* ---------------------------------------------------------------- */ @@ -399,12 +384,6 @@ void CLOSURE_NAME( } out_spec += spec_accum.rgb * ssr_spec * spec_occlu * float(specToggle); - -# ifdef HAIR_SHADER - /* Hack: Overide spec color so that ssr will not be computed - * even if ssr_id match the active ssr. */ - ssr_spec = vec3(0.0); -# endif #endif #ifdef CLOSURE_REFRACTION |