A bunch of custom passes made for HDRP. This project have been setup for Unity 2021.1 version with HDRP 12.x.
Features:
- Edge detect
- Draw Mesh
- Compositing with fullscreen pass
Source file link for this effect: TIPS.cs and TIPS.shader
Features:
- 2 Pass gaussian blur and a downscale
- Masking to not blur certain part of the screen using meshes
Source file link for this effect: SlightBlur.cs and Blur.shader
Source file link for this effect: 02_Selection_Objects.shader and 02_Selection_Fullscreen.shader
Effect made without custom C#, setup in the inspector:
Source file link for this effect: SeeThrough.cs and SeeThroughStencil.shader
Features:
- Early depth pass
- Composite with video in background
Features:
Features:
Features:
- Meta balls made by bluring normals
- Visual Effect Graph inside a custom pass
- Overriding depth and normals of a fullscreen transparent to emulate a surface
Features:
Features:
Rendering objects in the normal buffer is essential to make objects work with screen space effects. This example show how to create a custom pass that renders an object in the depth, normal and color buffer so the SSAO can correctly be applied (you can see the exagerated SSAO effect in this screenshot)
And this is the same image without rendering the object to the normal buffer:
As you can see the SSAO is completely messed-up
Note that because you need to render the object in both depth-prepass and forward pass, you need two custom passes volume with different injection points:
This effect blurs the camera color buffer and renders the screenspace UI on top of it. It is intended to be used in the after post process injection point
Note that this custom pass also avoid z test issues when doing this kind of as the transparent objects are rendered after everything.
This effect allows you to render an object (for example a video player) without TAA. It uses custom post processes to achieve this, so be sure to have the "VideoPlaybackWithoutTAAPostProcess" post process in your HDRP default settings:
As you can see in the videos, this pass will remove all artifacts visible when an object doesn't have valid motion vector data (which is the case for most texture animation or video playback):
With TAA:
VideoWithTAA.mp4
Without TAA:
VideoWithoutTAA.mp4
By default in this effect, the fixDepthBufferJittering
field is disabled because it's a very costly operation (re-render all the objects in the scene into an unjittered depth buffer) but it allows to get rid of all TAA artifacts remaining after you add this effect (mainly depth jittering).
Custom pass effect sources: Assets/CustomPasses/Video Playback Without TAA.
Render the Object motion vectors (not camera motion vectors!) into a render texture
Sources: Assets/CustomPasses/RenderMotionVectors
Custom pass that can copy the following buffers to a render texture:
- Color
- Normal
- Roughness
- Depth
- Motion Vectors
Source: Assets/CustomPasses/CopyPass