diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-17 20:08:28 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-17 20:11:22 +0300 |
commit | ff7220349d32e747c7559809d68de7d835c0c1cd (patch) | |
tree | c6955f0b86bcf12ab6dc5d87b4a48300375d3da3 /source/blender/gpu/CMakeLists.txt | |
parent | a0d7db503d82c1a5b56a5723da90364f11569b37 (diff) |
Compositing works with X-Ray.
Basically, before drawing X-Rays, we now bind a second depth buffer.
After drawing XRays, we do an extra resolve pass where we overwrite the
non-XRay depth buffer in pixels where the depth is not maximum (which
means background pixel, since depth is cleared before drawing X-Ray
objects).
This ensures both scene and X-Rays keep their depth values and are ready
for compositing. Well, the odd effect due to depth discontinuities can be
expected, and X-Rays are a bit more expensive (extra buffer + resolve pass)
but at least X-Rays won't invalidate depth values anymore. Whee!
Diffstat (limited to 'source/blender/gpu/CMakeLists.txt')
-rw-r--r-- | source/blender/gpu/CMakeLists.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index 7e32105a916..12b7f864469 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -69,6 +69,7 @@ set(SRC shaders/gpu_shader_vertex.glsl shaders/gpu_shader_vsm_store_frag.glsl shaders/gpu_shader_vsm_store_vert.glsl + shaders/gpu_shader_fx_depth_resolve.glsl GPU_buffers.h GPU_draw.h @@ -96,6 +97,7 @@ data_to_c_simple(shaders/gpu_shader_fx_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_fx_ssao_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_fx_dof_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_fx_dof_vert.glsl SRC) +data_to_c_simple(shaders/gpu_shader_fx_depth_resolve.glsl SRC) data_to_c_simple(shaders/gpu_shader_fx_lib.glsl SRC) if(WITH_GAMEENGINE) |