1.4.1
Bugfix Compression Volume
Compression volume rendering code was erroneously disabled in 1.4.0. Reenabled it.
New Lighting Feature: Shadow Mask
Shadow Mask baked shadows are now supported. Shadow Mask allows baking shadows for up to 4 lights per surface. Static surfaces recieve high quality Shadow Mask lightmap textures. These Shadow mask textures are sampled per-vertex if Shading Evaluation Mode is set to Per Vertex, or sampled per-pixel if Shading Evaluation Mode is set to Per Pixel. Dynamic objects will sample Shadow Mask values from the nearby Light Probe Group.
To use Shadow Mask shadows:
- Under Window->Rendering->Lighting: Go to the Mixed Lighting section, and turn ON Baked Global Illumination. Also set Lighting Mode to Shadow Mask.
- Make sure any Game Objects that you would like to receive Shadow Mask Lightmaps are set to Static. This should automatically set the following settings:
- Mesh Renderer->Lighting->Receive Shadows: True
- Mesh Renderer->Lighting->Contribute Global Illumination: True
- Mesh Renderer->Lighting->Receive Global Illumination: Lightmaps
- Make sure Generate Lightmap UVs is enabled in your model import settings
- Make sure the Min Lightmap Resolution is correct for your Window->rendering->Lighting->Lightmap Resolution setting.
- Make sure any dynamic Game Objects that you would like to receive Shadow Mask Probe data have the following settings:
- Mesh Renderer->Lighting->Receive Shadows: True
- Mesh Renderer->Lighting->Receive Global Illumination: Light Probes
- If your scene contains dynamic objects: make sure you have a Light Probe Group in your scene. GameObject->Light->Light Probe Group
- Make sure your scene has fairly good probe coverage. A probe every few meters is a reasonable choice for typically scaled games.
- For any light that you would like to case Shadow Mask shadows:
- Light->Mode: Mixed
- Light->Shadow Type: Hard Shadows or Soft Shadows
- Light->Realtime Shadows->Strength: This controls the amount lighting from this light will be darkened by Shadow Mask shadows. A value of 1.0 should be used for fully opaque shadows. Values < 1.0 can be used for stylistic purposes, but have no physical basis. Values < 1.0 are often used to cheaply approximate bounce light.
- Under Window->Rendering->Lighting: Click Generate Lighting and wait for the bake to complete.
For more information on the Shadow Mask feature in unity, visit: https://docs.unity3d.com/Manual/LightMode-Mixed-Shadowmask.html
Note: If ANY light source in your scene requests Shadow Mask, HPSXRP will use Shadow Mask mode for ALL Mixed light sources. You cannot have some lights set to Mixed and some lights set to baked. Of NO light sources request Shadow Mask, HPSXRP will automatically configure itself to expect Lighting Mode->Baked Indirect data.
Bugfix Fog Volume: Fog Color LUT Modes
Fixed WebGL compatibility issue with Fog Color LUT Modes. WebGL doesn't support SAMPLE_TEXTURE2D_LOD or SAMPLE_CUBE_LOD - replaced with SAMPLE_TEXTURE2D and SAMPLE_CUBE. The LOD call was unnecessary.
New Volume Feature: Accumulation Motion Blur Volume
Weight: Controls the amount of motion blur. A value of 0.0 completely disables motion blur. A value of 1.0 is the maxium amount of motion blur. Rather than using per-pixel motion vectors to render motion blur in a physically plausible way as is done in a contemporary PBR render pipeline, motion blur in HPSXRP is implemented by simply blending the previous frame with the current frame. This accumulation-based motion blur was the common implementation in the PSX / N64 era. Lerping between the the current frame and the previous frame is called an Exponential Moving Average. An Exponential Moving Average creates a gaussian-shaped falloff over time. An Exponential Moving Average has a non-linear response to the Weight variable. In particular, values between [0.0, 0.5] have a fairly small effect, compared to values between [0.9, 0.95] which have a relatively strong effect.
Vignette: Controls the amount the effect fades out toward the center of the screen. A value of 0.0 creates uniform zoom across the entire screen, no fade out. A value of 1.0 removes zoom from the center of the screen. A value of -1.0 removes zoom from the edges of the screen.
Dither: Controls the amount of dither to apply to the weight when compositing the frame history with the current frame. The history is composited with an 8 bit per pixel alpha value. Dither is required to appoximately capture very low history weight pixels.
Zoom: Controls the amount of zoom applied to the history before it is blended. Values > 0.0 create a outward radial blur effect. Values < 0.0 create an inward pincushion blur effect.
Zoom Dither: Controls how much dither to apply to break up banding artifacts that occur when zooming more than 1 pixel. A value of 0.0 causes maximum banding, which is what is often seen in PSX / N64 zoom blur effects. A value of 1.0 removes all banding but introduces dither noise.
Zoom Anisotropy: Controls the directionality of the zoom. A value of 0.0 blurs uniformly in all directions. A value of 1.0 blurs only horizontally. A value of -1.0 blurs only vertically.
Apply to UI Overlay: When enabled, motion blur will be applied to UI Overlay geometry as well as background and main geometry. When disabled motion blur is only applied to background and main geometry. When disabled, an additional render target is allocated and blitted to in order to capture the pre-ui state of the rasterization render target.
Bugfix UV Animation Mode: Flipbook
Fixed flipbook uv calculation bugs that caused unintentional jerky animation and frame drop outs. Special thanks to Fever Dream Johnny who noticed the bug and provided the first iteration of the bugfix.
Bugfix Material Inspector: UV Animation Mode
Fixed bug where changing UV Animation Mode.Pan Sin.UV Animation Oscillation Frequency would erroneously zero out UV Animation Scale.