Menu

1 / 2

Making Grass Shadows Cheaper in Bevy: Why Gaussian Uses Nine Samples

DEV Community: rust·Masahiro Morino·17 days ago
#cYz4UGNM
#devtorust#devto#dev#ifdef#shadow
Long article (1639 words) — no AI summary yet.
Reading 0:00
15s threshold

I use Bevy to experiment with rendering and shaders. While working on grass, I noticed how much the filter setting changes the edges of the shadows falling across the blades. What changes in the renderer when you flip that one setting?

Changing the filter on grass and measuring the difference

In my vegetation lab, I switched the filter used by grass to receive shadows between Gaussian and Hardware2x2 . The trees and ground kept using Gaussian .

The left image uses Gaussian , and the right uses Hardware2x2 . Look at the grass in the foreground. The right image has thin, dark shadows across the blades. On the left, the transition from light to shade is smoother.

On the GPU, the main pass that draws opaque objects, including the grass, was about 0.96 ms shorter with Hardware2x2 when comparing the median results.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.