Skip to content

Commit 1e4fb54

Browse files
committed
fix(pbr): use clamp instead of reinhard
1 parent c28482c commit 1e4fb54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

assets/shaders/pbr.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ void main() {
217217

218218
vec3 result = ambient + Lo + emission;
219219

220-
// Reinhard tone-mapping (HDR → LDR) then gamma-encode for display
221-
result = result / (result + vec3(1.0));
220+
// Clamp tone-mapping (HDR → LDR) then gamma-encode for display
221+
result = clamp(ambient + Lo + emission, 0.0, 1.0);
222222
result = pow(result, vec3(1.0 / 2.2));
223223

224224
// Alpha: sample from texture if present, otherwise use tint/vertex alpha

0 commit comments

Comments
 (0)