Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 0e32ecf

Browse files
committed
Fixed negative values in color grading
1 parent bf46ec0 commit 0e32ecf

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this package will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [2.1.3] - 2018-xx-xx
8+
9+
### Fixed
10+
- Color grading would output negative values in some cases and break rendering on some platforms.
11+
712
## [2.1.2] - 2018-12-05
813

914
### Fixed

PostProcessing/Shaders/Builtins/Lut2DBaker.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Shader "Hidden/PostProcessing/Lut2DBaker"
179179
{
180180
float3 colorLutSpace = GetLutStripValue(i.texcoord, _Lut2D_Params);
181181
float3 graded = ColorGradeHDR(colorLutSpace);
182-
return float4(graded, 1.0);
182+
return float4(max(graded, 0.0), 1.0);
183183
}
184184

185185
ENDHLSL

PostProcessing/Shaders/Builtins/Lut3DBaker.compute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void Eval(uint3 id)
147147
// Color grade & tonemap
148148
float3 graded = ColorGrade(colorLutSpace);
149149

150-
_Output[id] = float4(graded, 1.0);
150+
_Output[id] = float4(max(graded, 0.0), 1.0);
151151
}
152152
}
153153

0 commit comments

Comments
 (0)