Custom Shaders

Dear all,

I am working on a webbased VR application, one mayor thing I developed for that a very simple costume shader. I would also like to write an exporter from Rhino. To make this meaningful it should be possible to understand how the model will look with this custom shader’s.

I have been looking through the Rhino3d Render Development Kid but couldn’t find the right point to start with.
What would be the easiest way to write a custom Vertex / Fragment Shader with a few custom uniforms, varyings and supported lights passed to the shader?

@jeff, is this something you can help with?

Custom shaders are currently not supported in Rhino. To do so requires a well defined shader architecture so that everything in Rhino’s display is also accessible to the shader. In other words, it requires a lot more than just supporting a few uniforms and varying parameters…not to mention some kind of UI in the material editor that provides managing and assignment of such shaders.

That being said, quite a bit of what I just mentioned does exist, it’s just not publicly available, and probably won’t be until after 6.0 ships… It might be possible to write a conduit that assigns, enables and draws the object yourself…but I would need to experiment with it, and there are a lot of issues like Render mode only that would need special handling, and some way to prevent Rhino from using its current shader(s).

I can’t get to any of that until after V6 SR0, and certainly nothing will happen in V5…sorry.


I see the difficulties, to bad its not working in Rhino 5.0 but looking forward for version 6.0.

Would it possible to hack the rendering pipline anyhow, I would need advanced stuff, only basic things in vertex / fragment shader, even teh viewport preview would be sufficient.