-
Notifications
You must be signed in to change notification settings - Fork 356
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
Visualization - Physicalised Marker Scale, Line Rendering (Using a geometry shader) #130
base: master
Are you sure you want to change the base?
Visualization - Physicalised Marker Scale, Line Rendering (Using a geometry shader) #130
Conversation
Thank you for you contribution! |
CLA signed: submission/523 |
Interesting patch. Just a couple of ideas. Would be nice to have some screenshots attached to this MR to show how result actually looks. Thick lines emulated by geometry shader in Core Profile and conventional lines in Compatible Profile (with very thick values to see how it actually works). As well as spherical markers ;).
I think that indeed, it would be more natural extending
Wouldn't it be more clear to make a patch for lines and then make another patch for new feature for sphere markers on top of it? |
I've marked this PR as draft mode as I fix a few issues and re-base the commits to make more sense :)
I'll get those screenshots and post them soon!
I think it would be best if the spheres did support pixmaps, so I will implement this sometime in the coming days/weeks. This means that it would be possible to set any
Yep. Probably I will split this PR into 3 separate ones, with a single commit each
|
This patch introduces two (2) visualisation changes in the form of geometry shaders.
When point clouds are displayed in the OCCT viewer, sometime screen-space pixel values don't allow points to be easily identified. For our purposes, it was nice to have these occur as actual physical circular shapes with a configurable radius (marker size).
Line rendering in OpenCASCADE in the Core OpenGL profile suffers on some cards (MacOS for example) as the OpenGL implementation will not obey the line width and instead set a line width of 1 pixel. This patch also introduces a geometry shader which will be enabled for line rendering when geometry shading is supported by the OpenGL driver.
Physical scales for marker elements are implemented in OpenGL using a geometry shader. This is currently exposed via the
SetMarkerPhysical
drawer attribute. I doubt this is the best way to express this - might be better to add this as anAspect3d_TypeOfMarker
or similar.Some implementation notes;
Graphic3d_ShaderManager.cxx
). In the future, a mesh or instanced compute shader may be a better fit.Graphic3d_ShaderObject::CreateFromSource
such that differing numbers of geometry shader inputs and outputs can be specifiedTHE_NB_POINT_CIRCLE_SEGMENTS
THE_LINE_END_CAP_SEGMENTS