How it works

Vfx grass generate grass using Vfx Graph, like many other shaders to make it more dynamic and easy to customize it uses camera and render texture to "paint" some of the visual effect.

And there is a slight different between HDRP and URP due to the rendering tech behind.

HDRP

HDRP uses 3 camera:

  • Projector Camera to capture

    • Albedo buffer - ground color

    • Depth buffer - grass position

    • Normal buffer - initial grass direction (following terrain or suface normal)

  • Killer Camera

    • Depth buffer - no grass position

  • Motion Camera

    • "Painting" motion vector for grass interaction

URP

HDRP uses 4 camera:

  • Projector Camera to capture

    • Ground color directly from camera to render texture

    • Depth buffer - grass position

  • Normal Camera

    • Normal buffer - initial grass direction (following terrain or suface normal)

  • Killer Camera

    • Depth buffer - no grass position

  • Motion Camera

    • "Painting" motion vector for grass interaction

Difference

HDRP
URP

Ground Color

using C#, grabbing the Albedo buffer from the camera

Directly from camera to render texture

Normal

From camera using custom pass volume

From camera using Custom Universal Renderer

Last updated