This page provides details on the V-Ray TexGLSL node.
Overview
The V-Ray GLSL texture map can be used to load OpenGL Shading Language GLSL shaders (.frag, .glsl files), as well as V-Ray precompiled fragment shaders (.pfrag files), and render them directly with V-Ray. If the shader file describes a material (rather than a texture), it can be rendered with a V-Ray MtlGLSL material or by assigning a V-Ray TexGLSL map to the color slot of a V-Ray Light material.
Note that both V-Ray MtlGLSL and V-Ray TexGLSL share the same user interface.
The V-Ray MtlGLSL material and the V-Ray TexGLSL map are part of the first stage of V-Ray implementation of GLSL support. In this version of V-Ray, the shaders are compiled to byte code for a software virtual machine, which is then interpreted. Due to this run-time interpretation, GLSL shaders can be somewhat slower to render than V-Ray shaders written in C++. In future builds of V-Ray, shaders will be directly compiled to machine code for faster rendering.
For the example on the right, four different V-Ray TexGLSL maps have been loaded into the diffuse channel of V-Ray Materials.
GLSL Code
GLSL Source – Specifies whether the GLSL shader code is inserted inline or loaded through a file.
Inline GLSL – The GLSL shader code is inserted inline.
File path (.oso/.osl) – The GLSL shader code is loaded through a file.
Path to .glsl/.frag/pfrag file – Specifies the path to the GLSL shader code file.
GLSL Params
Transparency – Overrides the alpha if Use Shader Alpha is off.
Transparency Tex – Uses a texture for the transparency.
Transparency Tex Mult – A multiplier for the transparency texture.
Use Shader Alpha – Uses the alpha calculated in the shader.
Max Ray Depth – Specifies the maximum reflection/refraction depth for the shader.
Clamp Result – Determines whether to force the result into the [0, Clamping Value] range.
Clamp Value – Specifies the upper clamp limit if Clamp Result is enabled.
UVW Generators Count – Specifies the number of UVW Generators provided for the GLSL shader.