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

Fix for wireframe rendering (issue 8729) #9698

Merged
merged 1 commit into from Sep 15, 2016

Conversation

ikerr
Copy link
Contributor

@ikerr ikerr commented Sep 15, 2016

This commit fixes wireframe rendering when groups and drawRange are in use.

I removed calls to checkEdge() in getWireframeAttribute() to ensure that the number of wireframe indices is exactly twice the number of non-wireframe indices. This makes it simple to adjust the group and drawRange start/end indices in WebGLRenderer.

#8729

@mrdoob
Copy link
Owner

mrdoob commented Sep 15, 2016

Indeed. Better to go simpler here.

@mrdoob mrdoob merged commit 900094e into mrdoob:dev Sep 15, 2016
@mrdoob
Copy link
Owner

mrdoob commented Sep 15, 2016

Thanks!

@ikerr
Copy link
Contributor Author

ikerr commented Sep 15, 2016

No prob, thanks for the quick turnaround!

@mrdoob
Copy link
Owner

mrdoob commented Sep 15, 2016

I think this is the right code though?

var rangeStart = geometry.drawRange.start * rangeFactor;
var rangeCount = geometry.drawRange.count * rangeFactor;

var groupStart = group !== null ? group.start * rangeFactor : 0;
var groupCount = group !== null ? group.count * rangeFactor : Infinity;

var drawStart = Math.max( rangeStart, groupStart );
var drawEnd = Math.min( dataCount, rangeStart + rangeCount, groupStart + groupCount ) - 1;

mrdoob added a commit that referenced this pull request Sep 15, 2016
@ikerr
Copy link
Contributor Author

ikerr commented Sep 16, 2016

Yes, I think you're right. I'll update my branch.

@ikerr ikerr mentioned this pull request Sep 16, 2016
aardgoose pushed a commit to aardgoose/three.js that referenced this pull request Oct 7, 2016
aardgoose pushed a commit to aardgoose/three.js that referenced this pull request Oct 7, 2016
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.

None yet

2 participants