Page Contents


The VRayMtlOSL material can be used to load OSL shader code files (.osl) or OSL object code files (.oso) and render them directly with V-Ray. The VRayOSLMtl plug-in can be used with shaders that write in closure color output parameters. 


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.

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.

Closure Output – specifies the closure color source for the materials's output. The built-in output closure color parameter Ci is selected by default.

Shader Attributes

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


  • The VRayOSLMtl material automatically compiles OSL shaders to object code (OSO format) upon shader selection. No following compilations occur (even at render events). If the loaded OSL shader is modified use the context menu options Reset or Reload of the Shader file button for your changes to take effect.
  • An OSL compiler that translates *.osl files to *.oso files can be found in the tools subdirectory of V-Ray's root installation folder.