Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeMidnight
/** Create a simple shader node using the standard OSL "emissive" shader */
nsi.Create( "simpleshader", "emissiveshader" );
nsi.SetAttribute( "simpleshader", NSI::CStringPArg("shaderfilename", "emissive") );

/** Create an attributes nodes and connect our shader to it */
nsi.Create( "attr", "attributes" );
nsi.Connect( "simpleshader", "", "attr", "surfaceshaersurfaceshader" );

/* Connecting the attributes node to the mesh assign completes the assignment */
nsi.Connect( "attr", "", "simple mesh", "geometryattributes" );

...