Got zoombombed with that open invitation. I’m going to try again in a half an hour (12 Pacific time). Let me know if you would like to attend and I’ll send a private invite.
I meant the actual shader functionality.
To have a single component doing everything: manipulating geometries and having the component preview itself made from ghgl internally and parametrically.
(Maybe it was already accessible, but it’s the first time for me seeing what you did.)
The shader code has to be in GLSL specific syntax as that code is directly sent to the GPU for compilation and execution. I could make this code as some “preview” setting on a component, but that would require quite a bit of new code. For all of the experiments that I’ve done, it really feels cleanest to just turn the preview off for the upstream components.
Can somebody explain in one sentence what ghgl is or where to find information about what it is other than how it works?
Edit: Just found this https://github.com/mcneel/ghgl/wiki
“GhGL is a set of OpenGL shader authoring components for Grasshopper that display shader results in Rhino viewports with inputs defined by Grasshopper data.”
Looks cool!
GhGL is a grasshopper component that allows customized display in Rhino viewports.
That’s about as terse as I can get. These components are basically “scripting components” that provide support for writing OpenGL shader programs with GLSL shading language. We use these components to debug and improve the OpenGL display in Rhino. The components can be used to perform all sorts of drawing effects and are fast since they are running programs on your GPU.
I had some difficulties with the vectors (still some error on vectors …), not sure I understand well how to transfer data and if it mandatory between the tabs (vertex, …).
It looks like your shader is attempting to draw some silhouettes by comparing the normal vector of a triangle with the camera direction. I’ll see if I can add to the sample above to include this effect.
On latest wip + GhGL v7.0.3 as in the video, I have point size not working correctly.
With rhino antialias off dots are showed as a single pixel.
With antialias on (any “x”) dots are shower as circles with 64pixel diameter.
I cannot change the pixel size with the built-in right-click menu.
That is clean GLSL code. My initial guess is that this could be a driver bug. If you can update your driver, you might want to try it and see if it makes a difference. One or two pixel points are common in OpenGL, but other sizes are often implemented using other techniques.
The points that we draw in Rhino use a different technique of drawing through the use of a geometry shader to expand a point into a screen aligned quad. I’ll be covering that technique in a discussion on billboards this week on Wednesday.