All Projects → keijiro → Contactshadows

keijiro / Contactshadows

Experimental implementation of contact shadows for Unity.

Projects that are alternatives of or similar to Contactshadows

Noiseball2
A small example of procedural modeling with compute shaders.
Stars: ✭ 215 (-1.83%)
Mutual labels:  unity, unity3d, shader
Unity Texture Curve
✏️ Example showing how to bake an AnimatedCurve into a Texture and use it in a shader.
Stars: ✭ 149 (-31.96%)
Mutual labels:  unity, unity3d, shader
Kinotube
An image effect simulating analog video artifacts in Unity.
Stars: ✭ 142 (-35.16%)
Mutual labels:  unity, unity3d, shader
Lwrpshaders
A collection of high customizable unlit shaders for Lightweight Render Pipeline
Stars: ✭ 125 (-42.92%)
Mutual labels:  unity, unity3d, shader
Nvjob Water Shader Simple And Fast
#NVJOB Simple Water Shaders. Free Unity Asset.
Stars: ✭ 172 (-21.46%)
Mutual labels:  unity, unity3d, shader
Kinostreak
Anamorphic lens flare effect for Unity
Stars: ✭ 139 (-36.53%)
Mutual labels:  unity, unity3d, shader
Shinyeffectforugui
Shiny effect of uGUI, which does not need mask or normal map.
Stars: ✭ 204 (-6.85%)
Mutual labels:  unity, unity3d, shader
Spriteglow
A sprite glow effect for Unity game engine
Stars: ✭ 1,287 (+487.67%)
Mutual labels:  unity, unity3d, shader
Rimlight
Customizable rimlight shader for Unity that includes pulsation and noise scrolling. Give your scenes that extra oomph!
Stars: ✭ 170 (-22.37%)
Mutual labels:  unity, unity3d, shader
Bloodfx
Procedural blood stain shader
Stars: ✭ 170 (-22.37%)
Mutual labels:  unity, unity3d, shader
Proccharvfx
Procedural character generation with Unity Shader Graph and VFX Graph
Stars: ✭ 114 (-47.95%)
Mutual labels:  unity, unity3d, shader
Kinobinary
Binary image effect for Unity
Stars: ✭ 180 (-17.81%)
Mutual labels:  unity, unity3d, shader
Unitylibrary
📚 Library of all kind of scripts, snippets & shaders for Unity
Stars: ✭ 1,968 (+798.63%)
Mutual labels:  unity, unity3d, shader
Unity Shaders
✨ Shader demo - More than 300 examples
Stars: ✭ 198 (-9.59%)
Mutual labels:  unity, unity3d, shader
Gpu Planetary Rendering
GPU atmosphertic scattering and planet generation in Unity 3D
Stars: ✭ 92 (-57.99%)
Mutual labels:  unity, unity3d, shader
Noiseball3
A Unity example that shows how to use the new implementation of DrawProcedural.
Stars: ✭ 147 (-32.88%)
Mutual labels:  unity, unity3d, shader
Temporalreprojectionexample
Temporal reprojection example for Unity
Stars: ✭ 82 (-62.56%)
Mutual labels:  unity, unity3d, shader
Adamplanereflection
Planar reflection effect from the Adam Interior Environment package.
Stars: ✭ 86 (-60.73%)
Mutual labels:  unity, unity3d, shader
Computestochasticreflections
Compute Stochastic Screen Space Reflections for unity post processing
Stars: ✭ 163 (-25.57%)
Mutual labels:  unity, unity3d, shader
Kinovision
Frame visualization utility for Unity
Stars: ✭ 177 (-19.18%)
Mutual labels:  unity, unity3d, shader

ContactShadows

gif gif

This is an experimental implementation of contact shadows in Unity.

Contact Shadows is used to fill gaps between objects and shadows that are caused by shadow bias. It uses a screen-space ray tracing technique to determine regions of shadows more precisely than shadow mapping. It also employs a temporal reprojection filter to reduce processing load and artifacts caused by ray tracing.

System requirements

  • Unity 2017.2 or later

How to Use

The Contact Shadows component only renders shadows about a specific pair of a light and a camera. You have to specify which pair of light and camera is going to be rendered with the component.

  1. Add the Contact Shadows component to a camera.
  2. Set a light to the Light property of the component.

There are three sliders in the component:

Rejection Depth - This defines depths of each pixels, which controls the thickness of shadows. It's recommended to set this value to the average thickness of the objects in the view.

Sample Count - The number of samples used per ray.

Temporal Filter - This controls the strength of the temporal reprojection filter. You can get smoother results by increasing this value, but it also introduces gaps between objects and shadows while moving the camera. It's recommended to keep the value low for fast-moving cameras. The filter is to be disabled when the value is set to zero.

Current Limitations

  • At the moment, Contact Shadows only supports directional lights.
  • It's still under optimization work. It can be slow in some situations. Average GPU time is 1.5ms - 2.0ms under FHD (1080p) /w Radeon RX 480.
  • The denoise filter still has room for improvement. It introduces hard-edge artifacts in worst-case situations (e.g. Grass scene).

License

Copyright (c) 2017 Unity Technologies

This repository is to be treated as an example content of Unity; you can use the code freely in your projects. Also see the FAQ about example contents.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].