I’m looking to write a custom shader for V-Ray for Maya. I’ve found the VRayGLSLMtl in Maya which looks really good, but can’t see the VRayGLSLTex - is it available in Maya?
If not, what’s the next best way of writing a custom shader (before OSL is available) ?
What version of Maya and V-Ray are you using?
The VRayGLSLTex should be available in the 2.45 night builds, but I don’t think it is available in 2.40 unfortunately.
Thanks very much for the help - I now have the VRayGLSLMtl and VRayGLSLTex available which is great.
So I have a few questions about using GLSL shaders with vray for maya:
- As GLSL is for OpenGL graphics drivers are there any hardware requirements when using these shaders? Or is it a software implementation of the language? Are there any limitations related to using the GLSL shaders?
- I have used the examples in the online help to test materials using VRayGLSLMtl, but haven’t managed to get any texture displacements working in GLSL, is there a simple example for that? Presumably I need to add the code in the VRayGLSLTex shader, but I’ve tried to use a simple GLSL displacement shader and it won’t compile… any advice?
It is purely software implementation and doesn’t have any hardware requirements.
I’m not sure I understand this question.
Can you describe in more detail what exactly do you want to achieve?
As far as I know you can use VRayGLSLTex as any other texture in V-ray, so it should work if you plug it in the displacement nodes.
I’m not sure that it is possible to implement your own version of displacement in GLSL, because in VRayGLSLMtl and VRayGLSLTex
you can write only fragment shader type of code. Vertex, geometry and tessellation shaders are not possible.
I am testing the VRayGLSLTex to try using it for displacement. I’m connecting the outAlpha to the displacement shader and I’m finding it just balloons the object (whatever value I output from gl_FragColor in my code). This still happens even when I put the displacement shader’s scale to 0.0. Any idea where I’m going wrong?