diff options
author | Jeroen Bakker <jbakker> | 2020-02-20 16:53:53 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-02-21 13:13:43 +0300 |
commit | be2bc97eba499c48e3856c8e5ec4d869e28b4d04 (patch) | |
tree | 41d8d8fd5ec205e5fa00628aaf0f1603cb5e7825 /source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl | |
parent | 1f8f4c8cfeaf02754f3259f9eb811ada0ed3499e (diff) |
EEVEE: Render Passes
This patch adds new render passes to EEVEE. These passes include:
* Emission
* Diffuse Light
* Diffuse Color
* Glossy Light
* Glossy Color
* Environment
* Volume Scattering
* Volume Transmission
* Bloom
* Shadow
With these passes it will be possible to use EEVEE effectively for
compositing. During development we kept a close eye on how to get similar
results compared to cycles render passes there are some differences that
are related to how EEVEE works. For EEVEE we combined the passes to
`Diffuse` and `Specular`. There are no transmittance or sss passes anymore.
Cycles will be changed accordingly.
Cycles volume transmittance is added to multiple surface col passes. For
EEVEE we left the volume transmittance as a separate pass.
Known Limitations
* All materials that use alpha blending will not be rendered in the render
passes. Other transparency modes are supported.
* More GPU memory is required to store the render passes. When rendering
a HD image with all render passes enabled at max extra 570MB GPU memory is
required.
Implementation Details
An overview of render passes have been described in
https://wiki.blender.org/wiki/Source/Render/EEVEE/RenderPasses
Future Developments
* In this implementation the materials are re-rendered for Diffuse/Glossy
and Emission passes. We could use multi target rendering to improve the
render speed.
* Other passes can be added later
* Don't render material based passes when only requesting AO or Shadow.
* Add more passes to the system. These could include Cryptomatte, AOV's, Vector,
ObjectID, MaterialID, UV.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D6331
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl b/source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl index 1241cf0e387..e9da49c9eb9 100644 --- a/source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/effect_subsurface_frag.glsl @@ -20,13 +20,7 @@ uniform sampler2DArray utilTex; # define texelfetch_noise_tex(coord) texelFetch(utilTex, ivec3(ivec2(coord) % LUT_SIZE, 2.0), 0) #endif /* UTIL_TEX */ -#ifdef RESULT_ACCUM -/* Render Passes Accumulation */ -layout(location = 0) out vec4 sssDirect; -layout(location = 1) out vec4 sssColor; -#else layout(location = 0) out vec4 sssRadiance; -#endif float get_view_z_from_depth(float depth) { @@ -87,10 +81,7 @@ void main(void) accum += kernel[i].rgb * mix(color, sss_irradiance, s); } -#ifdef RESULT_ACCUM - sssDirect = vec4(accum, 1.0); - sssColor = vec4(texture(sssAlbedo, uvs).rgb, 1.0); -#elif defined(FIRST_PASS) +#if defined(FIRST_PASS) sssRadiance = vec4(accum, 1.0); #else /* SECOND_PASS */ sssRadiance = vec4(accum * texture(sssAlbedo, uvs).rgb, 1.0); |