bevyengine / bevyengine/bevy

Batch together shadow view draws for different materials with the same conceptual shaders

Open
#16,077 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Feature C-Performance D-Modest S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Entities with different materials get put in separate draw batches.

For shadow views (or depth-only prepass, but that's often niche), this is often an unnecessary constraint. Even if they have different bindings and shaders for the main pass shading, different materials often have the same shader for depth-only output like the shadow pass, and could be batched together.

## What solution would you like?

Batch together shadow view draws for entities with different materials, where possible.

## Additional context

Previously attempted in https://github.com/bevyengine/bevy/pull/11647

Contributor guide

Open the contributing guide

Research direction

Review the previously attempted PR #11647 first, then trace how shadow-view and depth-only draws are currently batched for entities with different materials. The work is done when compatible draws using the same conceptual shaders can share a batch without changing main-pass material behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.