diff options
Diffstat (limited to 'source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl b/source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl index 5b404ec5237..c60527162f7 100644 --- a/source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl +++ b/source/blender/draw/engines/eevee_next/shaders/eevee_geom_gpencil_vert.glsl @@ -3,6 +3,7 @@ #pragma BLENDER_REQUIRE(common_view_lib.glsl) #pragma BLENDER_REQUIRE(eevee_attributes_lib.glsl) #pragma BLENDER_REQUIRE(eevee_surf_lib.glsl) +#pragma BLENDER_REQUIRE(eevee_velocity_lib.glsl) void main() { @@ -38,6 +39,16 @@ void main() aspect, thickness, hardness); +#ifdef MAT_VELOCITY + /* GPencil do not support deformation motion blur. */ + vec3 lP_curr = transform_point(ModelMatrixInverse, interp.P); + /* FIXME(fclem): Evaluating before displacement avoid displacement being treated as motion but + * ignores motion from animated displacement. Supporting animated displacement motion vectors + * would require evaluating the nodetree multiple time with different nodetree UBOs evaluated at + * different times, but also with different attributes (maybe we could assume static attribute at + * least). */ + velocity_vertex(lP_curr, lP_curr, lP_curr, motion.prev, motion.next); +#endif init_globals(); attrib_load(); |