---
title: "V-Ray OSL"
canonical: "https://documentation.chaos.com/space/VRAYHOUDINI/113279724/V-Ray+OSL"
format: markdown
---
This page contains information about the V-Ray TexOSL node.


## **Overview**

---

The V-Ray TexOSL map can be used to load Open Shading Language [OSL ](https://github.com/imageworks/OpenShadingLanguage/)shader code files (.osl) or OSL object code files (.oso) and render them directly with V-Ray. It can be used with shaders that have simple color and float output parameters. These parameters are considered respectively as texture RGB and alpha outputs.

If the shader file describes a material (rather than a texture) and writes its result in an output closure color parameter, it is advised to use the [V-Ray OSL Material](https://docs-chaos.atlassian.net/wiki/spaces/VRAYHOUDINI/pages/113280167). Otherwise, the texture map will not evaluate the materials and will be rendered black.

For more on OSL in general, see the [Github reference](https://github.com/imageworks/OpenShadingLanguage/).

![image](media://e7a689a2-a43d-44bf-817a-2fd948d426cf)


## **OSL Code**

---

**OSL Source **–** **Determines how the OSL code is drawn.

**Inline OSL**  
**File path (.oso/.osl)**

**OSL Code **–** **A space for manual insertion of an OSL code.

**Path to .oso/.osl file** –** **Specifies the* .osl *or* .oso *file which contains the shader (object) code.

![image](media://1420522c-9425-4d4a-afd7-9c56e413a7c4)


## **Color & Alpha Tweaks**

---

These rollouts are the standard V-Ray for Houdini texture rollouts.

![image](media://e2869b3f-e9a9-4c27-980a-168cfff11478)


## **Notes**

---

- The V-Ray TexOSL texture automatically compiles[ OSL](https://github.com/imageworks/OpenShadingLanguage/) shaders to object code (OSO format) upon shader selection. No following compilations occur (even at render events). If the loaded [OSL](https://github.com/imageworks/OpenShadingLanguage/) shader is modified click the **Recreate attributes** button for your changes to take effect.
- An [OSL](https://github.com/imageworks/OpenShadingLanguage/) compiler that translates *.osl files to *.oso files can be found in the tools subdirectory of V-Ray's root installation folder.


## **References**

---

- [OSL home page at SPI](http://opensource.imageworks.com/?p=osl) - Open Shading Language home page at Sony Pictures Imageworks
- [OSL Google Code page](https://code.google.com/p/openshadinglanguage/) - Google Code project page for Open Shading Language
- [OSL GitHub page](https://github.com/imageworks/OpenShadingLanguage/) - GitHub project page for Open Shading Language