Skip to content

Is there a way to control an outlines visibility from different angles? #49

Answered by pragma37
MeganDrawsaLot asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you could drive the thresholds, the line width and/or the line color with textures or vertex colors.

But you need to make your own shader for that. Are you familiar with GLSL?

I think the easiest way for your use case would be just scaling the line width with a vertex color.
Start with the advanced_line example and change the line that says:
PO.line_width = line;
to:
PO.line_width = line * S.color[0].r;

Now create a vertex color layer for your mesh. The white parts will render the line as previously and the black ones won't have lines.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MeganDrawsaLot
Comment options

Answer selected by MeganDrawsaLot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants