Skip to content

Commit

Permalink
fix(MeshTransmissionMaterial): unset USE_ANISOTROPY, add compat alias (
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed Jun 1, 2023
1 parent 549493d commit ecea3a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/MeshTransmissionMaterial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ type MeshTransmissionMaterialType = Omit<
roughness?: number
/* Chromatic aberration, default: 0.03 */
chromaticAberration?: number
/* Anisotropy, default: 0.1 */
anisotropy?: number
/* AnisotropicBlur, default: 0.1 */
anisotropicBlur?: number
/* Distortion, default: 0 */
Expand Down Expand Up @@ -380,6 +382,7 @@ export const MeshTransmissionMaterial = React.forwardRef(
resolution,
backsideResolution,
background,
anisotropy,
...props
}: MeshTransmissionMaterialProps,
fref
Expand Down Expand Up @@ -454,6 +457,7 @@ export const MeshTransmissionMaterial = React.forwardRef(
// In order for this to not incur extra cost "transmission" must be set to 0 and treated as a reserved prop.
// This is because THREE.WebGLRenderer will check for transmission > 0 and execute extra renders.
// The exception is when transmissionSampler is set, in which case we are using three's built in sampler.
anisotropicBlur={anisotropy}
transmission={transmissionSampler ? transmission : 0}
thickness={thickness}
side={side}
Expand Down

1 comment on commit ecea3a1

@vercel
Copy link

@vercel vercel bot commented on ecea3a1 Jun 1, 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.