Skip to content

Commit 07e1c74

Browse files
2021.1 Universal/fix aces filter (#3776)
* Promoted some color conversion functions to full floating point precision for Switch platform in order to fix ACES tonemapping artefact. This issue does not affect other mobile platforms. * Made floating point fixes permanent to all platforms.
1 parent 35140d9 commit 07e1c74

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

com.unity.render-pipelines.core/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919
- Fixed ACES tonemaping for Nintendo Switch by forcing some shader color conversion functions to full float precision.
2020
- Fixed missing warning UI about Projector component being unsupported (case 1300327).
2121
- Fixed the display name of a Volume Parameter when is defined the attribute InspectorName
22+
- Fixed ACES tonemaping on mobile platforms by forcing some shader color conversion functions to full float precision.
2223
- Fix crash on VolumeComponentWithQualityEditor when the current Pipeline is not HDRP
2324

2425
## [10.2.0] - 2020-10-19

com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ real YCoCgCheckBoardEdgeFilter(real centerLum, real2 a0, real2 a1, real2 a2, rea
254254
}
255255

256256
// Converts linear RGB to LMS
257-
real3 LinearToLMS(real3 x)
257+
float3 LinearToLMS(float3 x) // Full float precision to avoid precision artefact when using ACES tonemapping
258258
{
259259
const real3x3 LIN_2_LMS_MAT = {
260260
3.90405e-1, 5.49941e-1, 8.92632e-3,
@@ -265,7 +265,7 @@ real3 LinearToLMS(real3 x)
265265
return mul(LIN_2_LMS_MAT, x);
266266
}
267267

268-
real3 LMSToLinear(real3 x)
268+
float3 LMSToLinear(float3 x) // Full float precision to avoid precision artefact when using ACES tonemapping
269269
{
270270
const real3x3 LMS_2_LIN_MAT = {
271271
2.85847e+0, -1.62879e+0, -2.48910e-2,
@@ -395,7 +395,7 @@ real LinearToLogC_Precise(real x)
395395
return o;
396396
}
397397

398-
real3 LinearToLogC(real3 x)
398+
float3 LinearToLogC(float3 x) // Full float precision to avoid precision artefact when using ACES tonemapping
399399
{
400400
#if USE_PRECISE_LOGC
401401
return real3(
@@ -418,7 +418,7 @@ real LogCToLinear_Precise(real x)
418418
return o;
419419
}
420420

421-
real3 LogCToLinear(real3 x)
421+
float3 LogCToLinear(float3 x) // Full float precision to avoid precision artefact when using ACES tonemapping
422422
{
423423
#if USE_PRECISE_LOGC
424424
return real3(

0 commit comments

Comments
 (0)