From f4fe3fb09b2b45647cb76710327c5029d68c87fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Fri, 29 Jul 2022 18:08:42 +0200 Subject: EEVEE-Next: Depth Of Field: Port implementation to compute shader This is a port of the previous implementation but using compute shaders instead of using the raster pipeline for every steps. Only the scatter passes is kept as a raster pass for obvious performance reasons. Many steps have been rewritten to take advantage of LDS which allows faster and simpler downsampling and filtering for some passes. A new stabilize phase has been separated from another setup pass in order to improve it in the future with better stabilization. The scatter pass shaders and pipeline also changed. We now use indirect drawcall to draw quads using triangle strips primitives. This reduces fragment shader invocation count & overdraw compared to a bounding triangle. This also reduces the amount of vertex shader invocation drastically to the bare minimum instead of having always 3 verts per 4 pixels (for each ground). --- source/blender/gpu/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 2de0f4e470a..4157caf45d7 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -454,6 +454,7 @@ list(APPEND INC ${CMAKE_CURRENT_BINARY_DIR}) set(SRC_SHADER_CREATE_INFOS ../draw/engines/basic/shaders/infos/basic_depth_info.hh + ../draw/engines/eevee_next/shaders/infos/eevee_depth_of_field_info.hh ../draw/engines/eevee_next/shaders/infos/eevee_film_info.hh ../draw/engines/eevee_next/shaders/infos/eevee_material_info.hh ../draw/engines/eevee_next/shaders/infos/eevee_motion_blur_info.hh -- cgit v1.2.3