1 parent fb1fae6 commit c967652Copy full SHA for c967652
1 file changed
assets/shaders/pbr.frag
@@ -217,8 +217,8 @@ void main() {
217
218
vec3 result = ambient + Lo + emission;
219
220
- // Reinhard tone-mapping (HDR → LDR) then gamma-encode for display
221
- result = result / (result + vec3(1.0));
+ // Clamp tone-mapping (HDR → LDR) then gamma-encode for display
+ result = clamp(ambient + Lo + emission, 0.0, 1.0);
222
result = pow(result, vec3(1.0 / 2.2));
223
224
// Alpha: sample from texture if present, otherwise use tint/vertex alpha
0 commit comments