Shadows

Jove Directional lights can cast shadows from an object to another and itself, using a main directional light. Currently only the main directional light can cast shadows, are lights are in the works and will be able to cast shadows in the future.

Shadows can help add a perception of depth to your scene and furthur increase realism.

[example image here]

## Enabling Shadows

1) To enable shadows make sure that shadows are enabled in your Jove Camera settings.

2) Once this checkbox is active go into your Main Direction Light and enable cast shadows, shadows will then be cast in your scene

## Shadows Camera Settings

In the Jove Camera Shadows settings, 3 parameters are open to be modified.

* Shadow Distance - The distance at which shadows will be rendered, in Unity units. After this range shadows will be clipped out and not be rendered.
* Use Shadows - Enabling this checkbox allows shadows to be cast and rendered. With it disabled Jove will not render shadows.
* Reuse Shadows - Allows you to reuse the shadows rendered from this camera to another, which reduces the rendering cost of the shadows when using multiple cameras. As the shadows are only rendered once, not twice. The slot allocates which camera is to reuse the shadows, if left none, than no shadows will be reused.

## Shadows Light Settings

In the Main Directional Light Shadow settings are multiple parameters that are open to be modified.\*Cast Shadows - This needs to be enabled to cast shadows, if this is disabled no shadows will be cast from this light.

* Cast Transparant Shadows - This needs to be enabled to cast transparant shadows, if this is disabled no shadows from transparant objects will be cast from this light.
* Colored Transparant Shadows - This needs to be enabled to cast colored transparant shadows, if this is disabled no colored shadows from colored transparant objects will be cast from this light, but will be instead just be colorless.
* Shadow Cascades - The amount of shadowmaps the light uses. Higher amounts give better quality at the cost of higher rendering times and increased memory usage.
* Shadow Resolution - The resolution per cascade. Higher resolutions give better quality at the cost of higher rendering times and memory usage increased memory usage.
* Shadow Precision - The variable type used for the shadow depth. Being float and half, with half being the less precise. Lower precision leads to faster rendering times but can suffer from visual artifacts.
* Shadow Casters - A layermask to determine which objects cast shadows, if an object is on a layer that isn't on the list than no shadow will be cast from it.
* Cascade Split Bias - Affects where cascades are split, 0 being a linear split while 1 being logarithmic.
* Shadow Bias - Moves shadows closer to the light source to help remove artifacts, set this variable as close to 0 as possible without artifacts occuring.
* Shadow Bias Translucency - Same as Shadow Bias, but affects how shadows are rendering on translucent objects.
* Shadow Offset - Moves the shadow camera (not accesible) further away from the scene, if tall objects are not rendering shadows properly incrase this value, but keep it as low as possible without any artifacts occuring.
* Shadow Darkening - Darken the shadow, lower values give smoother falloffs but can suffer from light leakage, set this to as close to 0 as possible without artifacts appearing.
* Shadow Darkening Translucency - Same as Shadow Darkening but from translucent shadows.
* Shadow Blur - Determines the radius of the shadow blur. Higher value gives smoother falloffs, but potentially more noisy results. This cost is paid for every time a shadowmap is sampled.
* Shadow Preblur - Determines the radius of the shadow preblur. Higher value gives smoother falloffs but loses details. This cost if paid for every time a shadowmap is rendered.
* Visualize Cascade - Visualises the cascade rendering, allowing easier tweaking in Cascade Split Bias
* Shadow Blur Type - Tha amount of samples used to blur the shadowmap. Higher values are smoother but have higher costs. This cost is paid for every time a shadowmap is sampled.
* Shadow Blur Type - The amount of samples used to preblur the shadowmap. Higher values are smoother but have higher costs, This cost is paid for every time a shadowmap is rendered.
* Cascade Update Delay - How many frames between each cascade update. Longer wait times means better performance but can cause artifacts if the camera or objects move to fast. When rotating the shadow casting light it is almost guarenteed to cause issues. To counteract this update the light direction in intervals and call ForceFullCascadesUpdate on the camera.
* Cascade Update Delay, Max Updates - The maximum amount of cascade updates at once, if this value is too low some of your shadow maps will never be rendered.