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?
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.
+1 have you ever found a way to “hack” the Display Pipeline? Im trying now to modify how textures of some materials get displayed and some info on programmability of rhino rendering would be really useful.
@Daniel_Krajnik - this is a pretty old post too revive. If you’re looking for something, then please post in in the Rhino channel. Best to provide a screen shot of what you are looking to achieve. And, answering the “why” question is often helpful.
@dale sorry, I’ve created a new thread with a more detailed description of my problem. If you could please take a moment at some point to look at it I’d be really grateful: