djo Posted August 27, 2015 Share Posted August 27, 2015 (edited) Hey Guys, I've been playing around with the GLSL shader for a few days and understood how it works etc.. I created a shader using mostly he vertex and fragment shader and get a good result of what I am trying to achieve in the viewport. I am now trying to add the vex code to replicate whatever I did in the GLSL shader so it would be picked up by Mantra and render something very similar to what I have in the openGL However I have no clue as how to bind the vex code to the mantra renderer as it doesn't seem to be taken into account The vex pane is mostly empty so I tried something very simple like this to begin with to make sure the shader was actual rendering something (I called my Houdini asset glslTest) surface glslTest() { vector color = {1,1,0}; Cf = color; } I tried this is a standard VEX shop and applied this to the object and it gets taken into account. Does the name of the procedure have to have a specific name or something for it to be taken into account ? I tried main like you would do in the glsl. Do you need to specify some pragmas ? The documentation is lacking a bit on this front given how Houdini is usually outstanding and a model for documentation made right. I would love to avoid having 2 seperate shaders. The documentation seems to be saying the glsl shader can do both viewport and Mantra renders. SideFX please tell us more on this Edited August 27, 2015 by djo Quote Link to comment Share on other sites More sharing options...
djo Posted August 27, 2015 Author Share Posted August 27, 2015 Ok I found it out For anyone interested, I needed to tick get properties from vex code under the node tab in the Type properties windows. This has however broken the parameters I was reading in the GLSL shader. I just need to reassing all the parameters in VEX now and they are properly transfered over to the GLSL shader Yay Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.