Skip to content

Commit

Permalink
Merge pull request #648 from jasonjgardner/master
Browse files Browse the repository at this point in the history
fix: PBR mode alphaTest value
  • Loading branch information
JannisX11 authored Nov 15, 2024
2 parents 152485a + a136850 commit 3702a79
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@
"has_changelog": true,
"website": "https://github.com/jasonjgardner/blockbench-plugins/",
"variant": "both",
"version": "1.1.0",
"version": "1.2.1",
"tags": [
"Minecraft: Java Edition",
"Minecraft: Bedrock Edition",
Expand Down
14 changes: 14 additions & 0 deletions plugins/pbr_preview/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,19 @@
]
}
]
},
"1.2.1": {
"title": "1.2.1",
"date": "2024-11-10",
"author": "Jason J. Gardner",
"categories": [
{
"title": "Alpha Threshold Fix",
"list": [
"Fixed alpha test threshold application on models.",
"Alpha test value is 1%"
]
}
]
}
}
2 changes: 1 addition & 1 deletion plugins/pbr_preview/pbr_preview.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/pbr_preview/src/lib/PbrMaterials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default class PbrMaterial {
emissive: emissiveMap ? 0xffffff : 0,
envMap: PreviewScene.active?.cubemap ?? null,
envMapIntensity: 0.95,
alphaTest: 0.1,
alphaTest: 0.01,
transparent: true,
...options,
});
Expand Down
1 change: 1 addition & 0 deletions src/pbr_preview/src/lib/applyPbrMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function applyToFace(
).getMaterial({
side: Canvas.getRenderSide(texture) as THREE.Side,
...materialParams,
alphaTest: 0.01,
});

Project.materials[texture.uuid] = THREE.ShaderMaterial.prototype.copy.call(
Expand Down

0 comments on commit 3702a79

Please sign in to comment.