From 2adfb259c6feecbea8c3ed3a0f5bc46aea1c3ec7 Mon Sep 17 00:00:00 2001 From: Pixelflinger Date: Tue, 7 Apr 2020 23:11:06 -0700 Subject: [PATCH] fix shader overflows leading to black pixels we clamp the output of post_process materials to 0,FLT16_MAX --- shaders/src/post_process.fs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shaders/src/post_process.fs b/shaders/src/post_process.fs index 04768f4d3c..44f7955f42 100644 --- a/shaders/src/post_process.fs +++ b/shaders/src/post_process.fs @@ -5,5 +5,9 @@ void main() { // Invoke user code postProcess(inputs); +#if defined(TARGET_MOBILE) + inputs.color = clamp(inputs.color, 0.0, MEDIUMP_FLT_MAX); +#endif + fragColor = inputs.color; }