Skip to content

Conversation

@WestLangley
Copy link
Collaborator

Somewhat subjective. Suggestions welcome.

@WestLangley WestLangley added this to the r153 milestone May 7, 2023
container = document.getElementById( 'container' );

camera = new THREE.PerspectiveCamera( 45, container.offsetWidth / container.offsetHeight, 1, 2000 );
camera = new THREE.PerspectiveCamera( 45, container.offsetWidth / container.offsetHeight, 10, 2000 );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Previous version has z-fighting issues, depending on the seed.

color: 0xee0808,
polygonOffset: true,
polygonOffsetFactor: 1, // positive value pushes polygon further away
polygonOffsetUnits: 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This improves the render of the wireframe.

const material2 = new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true } );

for ( let i = 0; i < 10; i ++ ) {
for ( let i = 0; i < 50; i ++ ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

More to look at :-)

//

const gui = new GUI();
gui.add( params, 'animate' );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Animation was obfuscating rendering issues. Allow animation to be disabled.

group.rotation.y += clock.getDelta() * 0.1;
if ( params.animate ) {

group.rotation.y += 0.002;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove clock so a restarted animation continues where it left off -- and does not jump.

@Mugen87 Mugen87 merged commit d6aaaa3 into mrdoob:dev May 8, 2023
@Mugen87 Mugen87 changed the title Improve Example Improve webgl2_multisampled_renderbuffers example. May 8, 2023
@WestLangley WestLangley deleted the dev-multisampled branch May 8, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants