Skip to content

Commit

Permalink
Merge pull request #296 from rt-nikowiss/fix/alpha-mode
Browse files Browse the repository at this point in the history
Fix shader mode selection for glTF MASK mode
  • Loading branch information
atteneder authored Dec 16, 2021
2 parents b35a5f7 + 5e727ca commit 01167df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Runtime/Scripts/Material/ShaderGraphMaterialGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ protected MetallicShaderFeatures GetMetallicShaderFeatures(Schema.Material gltfM
if (gltfMaterial.doubleSided) feature |= MetallicShaderFeatures.DoubleSided;

if (!sm.HasValue) {
sm = gltfMaterial.alphaModeEnum != AlphaMode.OPAQUE ? ShaderMode.Blend : ShaderMode.Opaque;
sm = gltfMaterial.alphaModeEnum == AlphaMode.BLEND ? ShaderMode.Blend : ShaderMode.Opaque;
}

feature |= (MetallicShaderFeatures)sm;
Expand Down

0 comments on commit 01167df

Please sign in to comment.