Fix #147782: Workbench alpha imprecision

Regression from 1c41815c4d.

The log2/exp2 round-trip can cause imprecisions, which are especially
notable with the alpha channel.
This removes the round-trip conversion for the alpha channel.

Pull Request: https://projects.blender.org/blender/blender/pulls/148218
This commit is contained in:
Miguel Pozo
2025-10-16 20:50:20 +02:00
parent 8b6a0f677f
commit 9d436aa31d
37 changed files with 72 additions and 72 deletions

View File

@@ -38,7 +38,7 @@ void main()
}
out_color /= taa_accumulated_weight;
/* Exit log2 space used for Anti-aliasing. */
out_color = exp2(out_color) - 1.0f;
out_color.rgb = exp2(out_color.rgb) - 1.0f;
/* Avoid float precision issue. */
if (out_color.a > 0.999f) {

View File

@@ -21,7 +21,7 @@ void main()
/* Clamp infinite inputs (See #112211). */
color = clamp(color, float4(0.0f), float4(1e10f));
/* Use log2 space to avoid highlights creating too much aliasing. */
color = log2(color + 1.0f);
color.rgb = log2(color.rgb + 1.0f);
frag_color += color * samplesWeights[i];
}