forked from bartvdbraak/blender
d59f53f7b7
reader. To make a generic OSL shader connectable to other nodes, the parameters must be declared via "input" and "output" child elements: <osl_shader name="tex" src="./osl/stripes.osl"> <input name="Stripes" type="int" /> <output name="ColorOut" type="color" /> </osl_shader> `name` must be the same as the OSL shader parameter name. `type` must be one of float, int, color, vector, point, normal, closure, string (matching cycles socket types) Beyond this the OSL script nodes then work just like all other nodes. OSL parameter sockets can be connected to other cycles nodes: <connect from="checker color" to="tex Stripes" /> <connect from="tex ColorOut" to="floor_closure color" /> They can set default values for the input sockets by attributes of the main node element: <osl_shader name="tex" src="./osl/stripes.osl" Stripes="3" > <input name="Stripes" type="int" /> <output name="ColorOut" type="color" /> </osl_shader> This system of specifying custom attributes should probably be changed, since it can easily create name conflicts and arbitrarily long elements. But that is a different issue to be solved for all nodes in general. |
||
---|---|---|
.. | ||
atomic | ||
audaspace | ||
container | ||
cycles | ||
dualcon | ||
elbeem | ||
ffmpeg | ||
ghost | ||
guardedalloc | ||
iksolver | ||
itasc | ||
locale | ||
memutil | ||
mikktspace | ||
moto | ||
opencl | ||
opencolorio | ||
opennl | ||
raskter | ||
rigidbody | ||
smoke | ||
string | ||
utfconv | ||
CMakeLists.txt | ||
SConscript |