...
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 a powerful camera description graph features that allows for allow rendering of multiple points of views view at once (as in stereo renders). 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 from screen's characteristics such as resolution, crop and shading samples. This means that it is possible to render two different images using the same camera with each image having its own resolution and quality settings.