Skip to content

Commit a22cfa4

Browse files
authored
StackLit: Fix SG surface option property block to only display energy conserving specular color option for the specular input parametrization (similar to case 1257050) (#3060)
1 parent 11b5984 commit a22cfa4

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
3939
- Fixed issue with shadow mask and area lights.
4040
- Fixed an issue with the capture callback (now includes post processing results).
4141
- Fixed decal draw order for ShaderGraph decal materials.
42+
- Fixed StackLit ShaderGraph surface option property block to only display energy conserving specular color option for the specular parametrization (case 1257050)
4243

4344
### Changed
4445
- Removed the material pass probe volumes evaluation mode.

com.unity.render-pipelines.high-definition/Editor/Material/StackLit/ShaderGraph/StackLitSurfaceOptionPropertyBlock.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ protected override void CreatePropertyGUI()
3333
// StackLit specific properties:
3434

3535
AddProperty("Base Color Parametrization", () => stackLitData.baseParametrization, (newValue) => stackLitData.baseParametrization = newValue);
36-
AddProperty("Energy Conserving Specular", () => stackLitData.energyConservingSpecular, (newValue) => stackLitData.energyConservingSpecular = newValue, 1);
36+
if (stackLitData.baseParametrization == StackLit.BaseParametrization.SpecularColor)
37+
{
38+
AddProperty("Energy Conserving Specular", () => stackLitData.energyConservingSpecular, (newValue) => stackLitData.energyConservingSpecular = newValue, 1);
39+
}
3740

3841
// Material type enables:
3942
context.AddLabel("Material Core Features", 0);

0 commit comments

Comments
 (0)