Skip to content

Commit f159a4a

Browse files
Popov72Mike Bond
authored andcommitted
Fix wrong shadows with morphs
1 parent a783d45 commit f159a4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/dev/core/src/Materials/shaderMaterial.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ export class ShaderMaterial extends PushMaterial {
886886
defines.push("#define USE_VERTEX_PULLING");
887887

888888
const indexBuffer = renderingMesh.geometry?.getIndexBuffer();
889-
if (indexBuffer) {
889+
if (indexBuffer && !(renderingMesh as Mesh).isUnIndexed) {
890890
defines.push("#define VERTEX_PULLING_USE_INDEX_BUFFER");
891891
if (indexBuffer.is32Bits) {
892892
defines.push("#define VERTEX_PULLING_INDEX_BUFFER_32BITS");

packages/dev/core/src/ShadersWGSL/iblVoxelGrid.vertex.fx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ fn main(input : VertexInputs) -> FragmentInputs {
163163

164164
#include <morphTargetsVertexGlobal>
165165
let inputPosition: vec3f = positionUpdated;
166-
#include <morphTargetsVertex>(vertexInputs.position\\),inputPosition))[0..maxSimultaneousMorphTargets]
166+
#include <morphTargetsVertex>(vertexInputs.position\\),inputPosition),vertexInputs.vertexIndex,vertIdx)[0..maxSimultaneousMorphTargets]
167167

168168
#include <instancesVertex>
169169

0 commit comments

Comments
 (0)