...
Code Block | ||||
---|---|---|---|---|
| ||||
/** Create another simple shader node using the standard OSL "emitter" shader. User default shader prameters. */ nsi.Create( "simpleshader2", "shader" ); nsi.SetAttribute( "simpleshader", NSI::CStringPArg("shaderfilename", "emitter") ); const char *k_attributes_override = "attribute override"; nsi.Create( k_attributes_override, "attribute" ); /* Default priiority is 0, so 1 will override */ nsi.Connect( k_simpler_shader2, "", k_attributes_override, "surfaceshaders", NSI::IntegerArg( "priority", 1) ); /* Connecting the attributes to the second instance transform will override the shader below because of higher priority. */ nsi.Connect( k_attributes_override, "", k_instance2, "geometryattributes" ); |
Multi-Camera
...
NSI has an elaborate camera description graph that allows for rendering of multiple points of views at once. Moreover, a single camera can be used to render multiple different screens. This is achieved by separating the camera's view description from the screen characteristics. Screen characteristics include such things as: resolution, crop and shading samples.