Nó Script¶
Cycles Only

The Script Node allows you to load and use custom shaders written in Open Shading Language (OSL) within the Cycles renderer. This node acts as a bridge between OSL shader code and the node-based material system in Blender.
Each Script node represents a single OSL shader, with its inputs and outputs defined by the parameters in the shader script. These shaders can be stored directly within the blend-file or referenced externally.
This feature is ideal for technical artists and shader developers who need fine-grained control over shading behavior beyond what the standard shader nodes provide.
Nota
The Script node is only available when Open Shading Language is enabled in the Cycles render settings. This feature requires rendering with the CPU or OptiX backend.
Dica
Para uso em produção, nós sugerimos usar um grupo de nó para agrupar os nós de script de sombreadores, e conectá-los a outros arquivos blend. Isso torna mais fácil fazer modificações aos nós depois a medida que soquetes são adicionados ou removidos, sem precisar atualizar os nós de script em todos os arquivos.
Propriedades¶
- Mode
How to link to OSL shaders.
- Internal:
A text data-block is used to store the OSL shader, and the OSO bytecode is stored in the node itself. This is useful for distributing a blend-file with everything packed into it.
- Script Node Update
Reloads the text file data-block, creating new inputs and outputs if needed.
- Externo:
Used to specify a
.osl
file from a drive, and this will then be automatically compiled into a.oso
file in the same directory. It is also possible to specify a path to a.oso
file, which will then be used directly, with compilation done manually by the user. The third option is to specify just the module name, which will be looked up in the shader search path.O caminho de busca do sombreador está localizado no mesmo lugar que os scripts ou caminho de configuração, dentro de:
Linux:
$HOME/.config/blender/4.5/shaders/
Windows:
C:\Users\$user\AppData\Roaming\Blender Foundation\Blender\4.5\shaders\
macOS:
/Users/$USER/Library/Application Support/Blender/4.5/shaders/