Skip to content

Commit

Permalink
fix: MTM prevent setting value on discard mat (#1584)
Browse files Browse the repository at this point in the history
  • Loading branch information
vis-prime authored Jul 26, 2023
1 parent 074960e commit eafb103
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/MeshTransmissionMaterial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@ export const MeshTransmissionMaterial = React.forwardRef(
state.gl.setRenderTarget(fboMain)
state.gl.render(state.scene, state.camera)

parent.material = ref.current
parent.material.thickness = thickness
parent.material.side = side
parent.material.buffer = fboMain.texture

// Set old state back
state.scene.background = oldBg
state.gl.setRenderTarget(null)
parent.material = ref.current
state.gl.toneMapping = oldTone
}
}
Expand Down

1 comment on commit eafb103

@vercel
Copy link

@vercel vercel bot commented on eafb103 Jul 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.