Error when using an OSL shader with node_texture.h

If the OSL shader body contains an import of the “node_texture.h” module, this shader can’t be executed in the latest versions of Blender.

When trying to execute such a shader, Blender throws an error:

This issue occurs because the latest versions of the official Blender distribution do not include this module.

In order for OSL shaders, which use this module, to run without errors, find the file “node_texture.h” in older Blender distributions and copy it to the current distributive.

This file must be copied to the Blender directory:

For example, for Windows OS:

If you don’t have an older version of Blender that still includes this file, you can download it from this repository. This file is from the official Blender 2.79b distributive.

Nikita

Author: Nikita

Blender add-ons developer and articles writer.