Skip to Content
RPG Hit EffectsGetting Started

Getting Started

Setup Instructions

Follow these steps to set up the hit effects in your project:


1. Shimmer Layer Setup

  • Add a new Layer named Shimmer.Add Shimmer Layer
  • Select the CritHitShimmer Prefab and make sure its Layer is set to Shimmer.
  • Make sure the Shimmer Camera is set to only render the Shimmer Layer, and your Main Camera should exclude the Shimmer Layer. Shimmer Camera Main Camera

2. URP Setup

  1. Open URP Settings:

    • Go to Edit > Project Settings > Graphics.
    • Double-click the Universal Render Pipeline Asset to open it in the Inspector.Render Pipeline Asset
  2. Add the Shimmer Renderer:

    • In the pipeline asset inspector, add the Shimmer Renderer to the list of renderer data.Add Shimmer Renderer
  3. Default Renderer Setup:

    • In the Default Renderer, scroll down and click Add Render Feature - Full screen Pass Renderer Feature.
    • Add the Shimmer Renderer Feature.Add Renderer Feature
  4. Assign Renderer to Camera:

    • Select the Shimmer Camera and set its Renderer to the newly added Shimmer Renderer.

3. HDRP Setup

  • Drag the ShimmerPass Prefab into your scene.
  • In the ShimmerPass component, set the Target Camera to your Main Camera.Custom Pass Volume

4. Testing the Effects

  • In the demo scene, locate the Effects GameObject.
  • Use the Effect Test Controller component to preview and test the hit effects in play mode.Effects Test

Damage-Based Settings

You can customize the hit effects dynamically based on gameplay damage by passing two key properties into the VFX Graph when triggering the effect:


1. Damage Intensity (Float)

  • This controls the overall intensity of the effect based on the damage dealt.
  • Value should be in the range of 0.0 to 1.0.
  • A common approach is to set this based on the damage roll, e.g., in typical RPG systems with min/max damage.
  • If you don’t want to use it, pass -1. This will cause the effect to display at maximum intensity, same as if you set it to 1.0.
  • Feel free to define this however it fits your game’s combat system.

2. Is Critical Hit (Boolean)

  • Set to true to trigger critical-specific effects.
  • Set to false for normal hits.

Effect Structure

  • The hit effect is split into two VFX Graphs:
  1. Shimmer Graph – Handles postfx distortion and sits on a separate GameObject Layer for rendering.
  2. Main Effects Graph – Includes all other visual elements like flash, spikes, dust, motion blur, backgrounds, etc.

How to Use Damage-Based Settings

Spawn Control (Per Effect)

  • Inside the Spawn Context of any effect block:

  • Use the value shown in the picture to control whether an effect spawns.

  • For example:

    Set the value to 0.8

    → This means the effect will only spawn if the damage intensity is greater than or equal to 0.8. Damage Based Spawn

Size Control (Output Context)

  • In the Output Context, you can set the size multiplier range. Damage Based Size

Opacity Control (Shader Graph)

  • For damage based opacity, set the range in the shader graph. Damage Based opacity

This setup allows you to make your effects feel dynamic and reactive, emphasizing the power of each hit visually based on gameplay data.

Last updated on