Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting scene.overrideMaterial is invalid after OutlinePass is enabled #30577

Closed
mlt131220 opened this issue Feb 21, 2025 · 0 comments · Fixed by #30578
Closed

Setting scene.overrideMaterial is invalid after OutlinePass is enabled #30577

mlt131220 opened this issue Feb 21, 2025 · 0 comments · Fixed by #30578
Labels
Milestone

Comments

@mlt131220
Copy link

Description

Setting scene.overrideMaterial is invalid after OutlinePass is enabled

Reproduction steps

Code

// code goes here
const outlinePass = new OutlinePass(new THREE.Vector2(this.viewport.container.offsetWidth, this.viewport.container.offsetHeight), this.viewport.scene, this.viewport.camera)
        outlinePass.visibleEdgeColor = new THREE.Color(outlineConfig.visibleEdgeColor || "#ffee00");
        outlinePass.hiddenEdgeColor = new THREE.Color(outlineConfig.hiddenEdgeColor || "#ff6a00");
        outlinePass.edgeStrength = outlineConfig.edgeStrength || Number(3.0);
        outlinePass.edgeGlow = outlineConfig.edgeGlow || Number(0.2);
        outlinePass.edgeThickness = outlineConfig.edgeThickness || Number(1.0);
        outlinePass.pulsePeriod = outlineConfig.pulsePeriod || Number(0.0);
        outlinePass.usePatternTexture = outlineConfig.usePatternTexture || false;
        outlinePass.selectedObjects = [];
        composer.addPass(outlinePass);

this.viewport.scene.overrideMaterial = new THREE.MeshNormalMaterial();

Live example

Screenshots

Image

Version

r170

Device

Desktop

Browser

Chrome

OS

Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants