This page provides information on the V-Ray GLSL Map.

 

Page Contents ×

Overview


The VRayMtlGLSL and VRayTexGLSL nodes can be used to load GLSL shaders (.frag, .glsl files) or 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 VRayMtlGLSL material or by assigning a VRayTexGLSL map to the color slot of a VRayLightMtl material.

Note that both VRayGLSLMtl and VRayTexGLSL share the same user interface.  

The VRayMtlGLSL material and the VRayTexGLSL 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 VRayTexGLSL maps have been loaded into the diffuse channel of V-Ray Materials.

 

UI Paths


 

 

||Hypershade|| > Create panel > VRay section > 2D Textures > VRay Tex GLSL

 ||Create Render Node|| > VRay section > 2D Textures > VRay Tex GLSL

 

 

Basic Parameters





Shader File Name – Specifies the .glsl, .frag, or .pfrag file which contains the shader code.

Recreate attributes – Reloads the shader and recreate its parameters.

Save compiled shader – Saves the shader file as a binary precompiled fragment shader file (.pfrag).

Viewport color – Specifies the diffuse component of the material used in the viewport shading.

Max Ray Depth – Specifies the maximum reflection/refraction depth for the shader.

Clamp Result – Determines whether to force the result in the  [0, Clamp Value]  range or not.

Clamp Value – Specifies the upper clamp limit if Clamp Result is enabled.

Use Shader Alpha – When enabled, use the alpha calculated in the shader.

Transparency – Overrides the alpha if Use Shader Alpha is disabled.

 

Shader Attributes


 

 

This section holds all parameters found in the shader itself and can be edited from here.

 

References