Skip to content

Commit

Permalink
trying to get AttenuationColor to work better
Browse files Browse the repository at this point in the history
  • Loading branch information
hybridherbst committed May 27, 2022
1 parent 0056d3e commit e543bb8
Show file tree
Hide file tree
Showing 2 changed files with 788 additions and 146 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2292,7 +2292,7 @@ protected virtual async Task ConstructMaterial(GLTFMaterial def, int materialInd
var volume = GetVolume(def);
if (volume != null)
{
volumeMapper.AttenuationColor = volume.attenuationColor.ToUnityColorLinear();
volumeMapper.AttenuationColor = QualitySettings.activeColorSpace == ColorSpace.Linear ? volume.attenuationColor.ToUnityColorLinear() : volume.attenuationColor.ToUnityColorRaw();
volumeMapper.AttenuationDistance = volume.attenuationDistance;
volumeMapper.ThicknessFactor = volume.thicknessFactor;
var td = await FromTextureInfo(volume.thicknessTexture);
Expand Down

0 comments on commit e543bb8

Please sign in to comment.