-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Thick Lines and Varying Point Sizes for Programmable Renderer #8019
base: master
Are you sure you want to change the base?
Thick Lines and Varying Point Sizes for Programmable Renderer #8019
Conversation
Wowww marvellous work @NickHardeman |
Yay! Wow, nice work @NickHardeman! |
…ets color to black and now sets point size. Line shader optimizations and corrections for rendering lines in 3d space.
This PR will close #8021 |
…esh when custom shader or material is bound. Simplify texture coords for lines, enable for texture rect.
When drawing an ofPolyline and a texture is bound, the tex coords get added so that the first point has texcoord.x == 0.0 and the last point has texcoord.x == texture.width. See the example via emscripten |
Without changing the vertices of miters, they can look like it does below, here they are clamped, but it doesn't look right with smaller angles between lines. Notice the colored lines. The idea for sanding down the miters comes from this post by Matt Stobbs. It has been expanded upon to remove the if statement and implement a smooth transition between the miter and the sanded miter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, yeah just rebase onto latest master and lets check ci
Thank you @danoli3. I can update next week when I am back at a computer 😀 |
Wicked, we should just take a bunch of snapshots of gl / visual examples first draw frame:
|
I'd be good to merge this now - so we can get it in front of people. |
This PR attempts to mimic some of the original line and point drawing functionality allowed by earlier versions of GL for the Programmable GL Renderer pipeline while introducing some simple additional functionality.
Lines
This PR aims to enable varying line width for the following:
Currently supported attributes:
The approach for the thick lines involves adding additional points per vertex to a vbo mesh that feeds additional VAO attributes to a shader.
This PR currently does not intend to do the following
Example Code:
Points
Points can vary in size based of a newly introduced function
ofSetPointSize(pointSize);
Supports
Example code:
Core functionality to the GL Programmable Renderer has been changed and thus requires extensive testing.
TODO:
Fixes #8011