Skip to content
Open
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
2 changes: 0 additions & 2 deletions Source/Common/GLTFUnarchiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,6 @@ public class GLTFUnarchiver {
material.blendMode = .replace
case "BLEND":
material.blendMode = .alpha
material.writesToDepthBuffer = false
material.shaderModifiers![.surface] = try! String(contentsOf: URL(fileURLWithPath: Bundle(for: GLTFUnarchiver.self).path(forResource: "GLTFShaderModifierSurface_alphaModeBlend", ofType: "shader")!), encoding: String.Encoding.utf8)
case "MASK":
material.shaderModifiers![.fragment] = try! String(contentsOf: URL(fileURLWithPath: Bundle(for: GLTFUnarchiver.self).path(forResource: "GLTFShaderModifierFragment_alphaCutoff", ofType: "shader")!), encoding: String.Encoding.utf8)
default:
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/schema/GLTFMaterial.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct GLTFMaterial: GLTFPropertyProtocol {
let _alphaMode: String?
/** The material's alpha rendering mode enumeration specifying the interpretation of the alpha value of the main factor and texture. */
var alphaMode: String {
get { return self._alphaMode ?? "OPAQUE" }
get { return self._alphaMode ?? "BLEND" }
}

let _alphaCutoff: Float?
Expand Down