Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed fog precision in some camera positions (case 1329603).
- Fixed contact shadows tile coordinates calculations.
- Fixed blocky looking bloom when dynamic resolution scaling was used.
- Fixed material Emission properties not begin animated when recording an animation (case 1328108).

### Changed
- Removed the material pass probe volumes evaluation mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ void UpdateEmissiveColorFromIntensityAndEmissiveColorLDR()
materialEditor.serializedObject.Update();
}

internal static void UpdateEmissiveColorFromIntensityAndEmissiveColorLDR(MaterialProperty emissiveColorLDR, MaterialProperty emissiveIntensity, MaterialProperty emissiveColor)
=> emissiveColor.colorValue = emissiveColorLDR.colorValue.linear * emissiveIntensity.floatValue;

internal static void UpdateEmissiveColorLDRFromIntensityAndEmissiveColor(MaterialProperty emissiveColorLDR, MaterialProperty emissiveIntensity, MaterialProperty emissiveColor)
{
Color emissiveColorLDRLinear = emissiveColorLDR.colorValue / emissiveIntensity.floatValue;
emissiveColorLDR.colorValue = emissiveColorLDRLinear.gamma;
}

void UpdateEmissionUnit(float newUnitFloat)
{
foreach (Material target in materials)
Expand Down Expand Up @@ -229,7 +238,7 @@ void DrawEmissionGUI()
if (intensityChanged && !unitIsMixed)
emissiveIntensity.floatValue = newIntensity;

UpdateEmissiveColorFromIntensityAndEmissiveColorLDR();
UpdateEmissiveColorFromIntensityAndEmissiveColorLDR(emissiveColorLDR, emissiveIntensity, emissiveColor);
}
}

Expand Down