Skip to content

Commit

Permalink
Merge pull request #357 from emackey/double-sided-alpha
Browse files Browse the repository at this point in the history
glTF BLEND mode didn't respect double-sided flag.
  • Loading branch information
lilleyse authored Mar 27, 2018
2 parents 99e8b7b + 640bec1 commit 25177db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/processPbrMetallicRoughness.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,11 @@ function generateTechnique(gltf, material, options) {
var techniqueStates;
if (defined(alphaMode) && alphaMode !== 'OPAQUE') {
techniqueStates = {
enable: [
enable: parameterValues.doubleSided ? [
WebGLConstants.DEPTH_TEST,
WebGLConstants.BLEND
]: [
WebGLConstants.CULL_FACE,
WebGLConstants.DEPTH_TEST,
WebGLConstants.BLEND
],
Expand Down

0 comments on commit 25177db

Please sign in to comment.