---
title: "VRayMtlGLSL"
canonical: "https://documentation.chaos.com/space/VMAYA/111740029/VRayMtlGLSL"
format: markdown
---
This page provides details on the settings for the GLSL Material in V-Ray.


## **Overview**

---


<details>
<summary>UI Path: ||Right-click on the geometry|| > Assign New Material...</summary>

||Right-click on the geometry|| **>** Assign New Material... **> VRay** section **> VRay Mtl GLSL**


![image](media://bcbe7b69-8c01-4794-9853-749dfdcb080e)


||V-Ray Shelf|| **> **Right-click to** Create V-Ray Materials **button **> VRay Mtl GLSL**


![maya2025_72010_Shelf_VRayMtls.png](media://37f3e75e-643d-46a1-acd0-073bfd1cf690)



||Hypershade||** > Window** tab** >** **Create... > VRay **section **> VRay Mtl GLSL**


![image](media://ea551abe-bdbd-452b-ab0a-93a0120f7b19)
</details>



## **Basic Parameters**

---

##   
**Shader Attributes**

---

## **GPU Support**

---

> Macro (anchor)

The GLSL shader is supported by V-Ray GPU within limitations. Below you can find detailed information about the GPU support.


| **Feature** | **GPU Support** |
| --- | --- |
| **Built-in variables** |
| **gl_NormalMatrix ** | Always identity matrix. |
| **gl_ModelViewMatrixTranspose ** | Always identity matrix. |
| **gl_TextureMatrix ** | Always identity matrix. |
| **gl_TextureMatrixInverse ** | Always identity matrix. |
| **gl_TextureMatrixInverseTranspose** | Always identity matrix. |
| **gl_TextureMatrixTranspose** | Always identity matrix. |
| **gl_ModelViewMatrixInverseTranspose ** | Always identity matrix. |
| **gl_FogFragCoord ** | Always is a zero.> Macro (anchor) |
| **gl_TexCoord[] ** | All gl_TexCoord[]  elements are identical, i.e. multiple UVW channels are not supported. <sup>[VRayMtlGLSL#1](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111740029/VRayMtlGLSL#1)</sup> |
| **Built-in functions** |
| **dFdx(); dFdy() ** | Always return zero. |
| **fwidth() ** | Always returns zero. |
| **V-Ray extensions to GLSL** |
| **vr_Velocity ** | Always is a zero. |
| **vr_NumSuperSamples ** | Always is 1. |
| **vr_SuperSampleIndex ** | Always is 1. |
| **vr_TextureDu[] ** | Not supported. |
| **vr_TextureDv[] ** | Not supported. |
| **vr_VertexData[] ** | Not supported. |
| **vr_FrameData ** | Only the following are supported:<br>vr_FrameData.focalLength  
vr_FrameData.aperture  
vr_FrameData.dofFocus  
vr_FrameData.dofRadius  
vr_FrameData.imageResolution  
vr_FrameData.imagePlaneOffset |
| ** vr_trace() ** | Not supported. |
| **vr_evalLight() ** | Not supported. If attempted to call it will assign the following constants to the output light iterator:<br>light.dot_nl = -1.0  
light.contribution = vec3(0.0, 0.0, 0.0)  
light.direction = vec3(0.0, 0.0, 0.0) |
| ** vr_intersect() ** | Not supported.> Macro (anchor) |
| **BRDF** | Only the following BRDF calls are supported <sup>[2](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111740029/VRayMtlGLSL#2)</sup>:<br>vr_brdf_diffuse()  
vr_brdf_glass()  
vr_brdf_mirror()  
vr_brdf_ggx() |
| **Keywords** | The following keywords are ignored:<br>__channel<br>__persistent<br>__native |

## **References**

---

- Randi J. Rost et al, **OpenGL Shading Language**, second edition, Addison-Wesley, 2006
- ** ****[Lighthouse3D.com](http://lighthouse3d.com/)**** **(link no longer active) - a useful site that describes the basics of GLSL and has many shader examples


## **Footnotes**

---

> Macro (anchor)



[1 ](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111740029/VRayMtlGLSL#1.1)– This is still work in progress.

> Macro (anchor)



[2](https://docs-chaos.atlassian.net/wiki/spaces/VMAYA/pages/111740029/VRayMtlGLSL#2.2) – Experimental feature.