diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-19 20:24:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-20 15:09:27 +0300 |
commit | 566a4a96cb516d7e7981cf78d24fcb7546deaaf4 (patch) | |
tree | c8142165227c969e3f185df2bc8585ef9e86c8f8 /source/blender/draw/engines/eevee/shaders/prepass_vert.glsl | |
parent | 86e0d13218d6e9f918ca857890ee1c0aa681091b (diff) |
Fix T57891: Radius of strip hair doesn't scale with object scale
Note that this only works fine with uniformly scaled objects.
Otherwise, the hair thickness will vary in a weird way depending on viewing
angles.
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/prepass_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/prepass_vert.glsl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl b/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl index e110937c5aa..1a8dbc97317 100644 --- a/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/prepass_vert.glsl @@ -1,6 +1,7 @@ uniform mat4 ModelViewProjectionMatrix; uniform mat4 ModelMatrix; +uniform mat4 ModelMatrixInverse; #ifdef CLIP_PLANES /* keep in sync with DRWManager.view_data */ @@ -20,6 +21,7 @@ void main() vec3 pos, tan, binor; hair_get_pos_tan_binor_time( (ProjectionMatrix[3][3] == 0.0), + ModelMatrixInverse, ViewMatrixInverse[3].xyz, ViewMatrixInverse[2].xyz, pos, tan, binor, time, thickness, thick_time); |