SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

Improve layering in the solari BRDF (#24243)

# Objective

Improve the solari BRDF. Split off from
https://github.com/bevyengine/bevy/pull/23818.

## Solution

The layering approach used in the current brdf to distribute energy
between the specular and diffuse lobes doesn't work, for reasons I
honestly don't quite understand.

The suggested changes are roughly inspired by [OpenPBR's equation
42](https://academysoftwarefoundation.github.io/OpenPBR/#model/basesubstrate/glossy-diffuse).
We're not using EON though, so this uses Filament's multiscattering
correction instead of equation 39.
This formulation has the downside of breaking reciprocity. As far as I
can tell the path tracer is unidirectional, so this shouldn't cause
issues.

---

## Showcase

### White furnace

Main:
<img width="1280" height="720" alt="main"
src="https://github.com/user-attachments/assets/c5fe02c7-1e3e-41ee-99af-e73e0fc8ae5c"
/>


This PR:
<img width="1280" height="720" alt="layering"
src="https://github.com/user-attachments/assets/8d28097f-572e-4a9e-aa66-875730357856"
/>

---
### PICA PICA pathtraced

<img width="1280" height="720" alt="animated"
src="https://github.com/user-attachments/assets/98716de5-1215-413a-a985-7d3fb0638dc0"
/>

Main:
<img width="1280" height="720" alt="main"
src="https://github.com/user-attachments/assets/32da9aa1-5235-4200-8c2a-33fd78b15b8b"
/>

This PR:
<img width="1280" height="720" alt="pr"
src="https://github.com/user-attachments/assets/a160eb3d-1c94-4d14-b769-0a981c7dc3dd"
/>
D
Dylan Sechet committed
370be1b02fc93a4bfabf61fb2fc66cf2affca495
Parent: a399db0
Committed by GitHub <noreply@github.com> on 5/15/2026, 10:06:46 PM