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:
1 |
error: could not find include file: node_texture.h |
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:
1 |
_your_path_to_Blender_/_current_Blender_version_/scripts/addons/cycles/shader/ |
For example, for Windows OS:
1 |
c:/blender_2_91/2.91/scripts/addons/cycles/shader/ |
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.