<?xml version="1.0"?>
<RiAPI>
	<!-- ====================================================================== -->
	<Procedures>

		<Section>Relationship to the RenderMan Shading Language</Section>

		<Procedure>
			<Name>Declare</Name>
			<ReturnType>RtToken</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>declaration</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<Outside/>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Section>Graphics State</Section>

		<Procedure>
			<Name>Begin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<ValidScope>
				<Outside/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>End</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<ValidScope>
				<BeginEnd/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>GetContext</Name>
			<ReturnType>RtContextHandle</ReturnType>
			<Arguments/>
		</Procedure>

		<Procedure>
			<Name>Context</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>handle</Name>
					<Type>RtContextHandle</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>FrameBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>number</Name>
					<Type>RtInt</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>FrameEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>WorldBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>WorldEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<World/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Conditional RIB</SubSection>

		<Procedure>
			<Name>IfBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>condition</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>ElseIf</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>condition</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>Else</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>IfEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
			</Arguments>
			<Rib/>
		</Procedure>


		<SubSection>Options</SubSection>
		<SubSubSection>Camera</SubSubSection>

		<Procedure>
			<Name>Format</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>xresolution</Name>
					<Type>RtInt</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>yresolution</Name>
					<Type>RtInt</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>pixelaspectratio</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>FrameAspectRatio</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>frameratio</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ScreenWindow</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>left</Name>
					<Type>RtFloat</Type>
					<Range><lt>right</lt></Range>
				</Argument>
				<Argument>
					<Name>right</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>bottom</Name>
					<Type>RtFloat</Type>
					<Range><lt>top</lt></Range>
				</Argument>
				<Argument>
					<Name>top</Name>
					<Type>RtFloat</Type>
				</Argument>
				<RibArgsCanBeArray/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>CropWindow</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>xmin</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge><lt>xmax</lt></Range>
				</Argument>
				<Argument>
					<Name>xmax</Name>
					<Type>RtFloat</Type>
					<Range><le>1</le></Range>
				</Argument>
				<Argument>
					<Name>ymin</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge><lt>ymax</lt></Range>
				</Argument>
				<Argument>
					<Name>ymax</Name>
					<Type>RtFloat</Type>
					<Range><le>1</le></Range>
				</Argument>
				<RibArgsCanBeArray/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Projection</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Clipping</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>cnear</Name>
					<Type>RtFloat</Type>
					<Range><ge>RI_EPSILON</ge></Range>
				</Argument>
				<Argument>
					<Name>cfar</Name>
					<Type>RtFloat</Type>
					<Range><gt>cnear</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ClippingPlane</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>z</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>nx</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ny</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>nz</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>DepthOfField</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>fstop</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>focallength</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>focaldistance</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Shutter</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>opentime</Name>
					<Type>RtFloat</Type>
					<Range><le>closetime</le></Range>
				</Argument>
				<Argument>
					<Name>closetime</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Displays</SubSubSection>

		<Procedure>
			<Name>PixelVariance</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>variance</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>PixelSamples</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>xsamples</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<Argument>
					<Name>ysamples</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>PixelFilter</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>function</Name>
					<Type>RtFilterFunc</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Exposure</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>gain</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>gamma</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Imager</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Quantize</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>one</Name>
					<Type>RtInt</Type>
					<Range><ge>0</ge></Range>
				</Argument>
				<Argument>
					<Name>min</Name>
					<Type>RtInt</Type>
					<Range><le>max</le></Range>
				</Argument>
				<Argument>
					<Name>max</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>ditheramplitude</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Display</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>mode</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>GaussianFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>BoxFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>MitchellFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>TriangleFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>CatmullRomFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>SincFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>DiskFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>BesselFilter</Name>
			<ReturnType>RtFloat</ReturnType>
			<Arguments>
				<Argument>
					<Name>x</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>y</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>xwidth</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>ywidth</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<SubSubSection>Additional options</SubSubSection>

		<Procedure>
			<Name>Hider</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ColorSamples</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>N</Name>
					<Type>RtInt</Type>
					<RibValue>size(nRGB)/3</RibValue>
				</Argument>
				<Argument>
					<Name>nRGB</Name>
					<Type>RtFloatArray</Type>
                    <RiLength>3*N</RiLength>
				</Argument>
				<Argument>
					<Name>RGBn</Name>
					<Type>RtFloatArray</Type>
					<Length>size(nRGB)</Length>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>RelativeDetail</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>relativedetail</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Implementation-specific options</SubSubSection>

		<Procedure>
			<Name>Option</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Attributes</SubSection>

		<Procedure>
			<Name>AttributeBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>AttributeEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Attribute/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Color and opacity</SubSubSection>

		<Procedure>
			<Name>Color</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>Cq</Name>
					<Type>RtColor</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Opacity</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>Os</Name>
					<Type>RtColor</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Texture coordinates</SubSubSection>

		<Procedure>
			<Name>TextureCoordinates</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>s1</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>t1</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>s2</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>t2</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>s3</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>t3</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>s4</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>t4</Name>
					<Type>RtFloat</Type>
				</Argument>
				<RibArgsCanBeArray/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Light sources</SubSubSection>

		<Procedure>
			<Name>LightSource</Name>
			<ReturnType>RtLightHandle</ReturnType>
			<Arguments>
				<Argument>
					<Name>shadername</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
					<AltTypeInt/>
					<RibOnly/>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>AreaLightSource</Name>
			<ReturnType>RtLightHandle</ReturnType>
			<Arguments>
				<Argument>
					<Name>shadername</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
					<AltTypeInt/>
					<RibOnly/>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Illuminate</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>light</Name>
					<Type>RtLightHandle</Type>
					<RibValue/>
				</Argument>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
					<AltTypeInt/>
					<RibOnly/>
				</Argument>
				<Argument>
					<Name>onoff</Name>
					<Type>RtBoolean</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Surface shading</SubSubSection>

		<Procedure>
			<Name>Surface</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Displacement shading</SubSubSection>
		<Procedure>
			<Name>Deformation</Name>
			<Deprecated/>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Displacement</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Volume shading</SubSubSection>
		<Procedure>
			<Name>Atmosphere</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Interior</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Exterior</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Layered Shaders</SubSubSection>

		<Procedure>
			<Name>ShaderLayer</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>layername</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ConnectShaderLayers</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>layer1</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>variable1</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>layer2</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>variable2</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
		</Procedure>


		<SubSubSection>Shading rate</SubSubSection>

		<Procedure>
			<Name>ShadingRate</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>size</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Shading interpolation</SubSubSection>

		<Procedure>
			<Name>ShadingInterpolation</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Matte objects</SubSubSection>

		<Procedure>
			<Name>Matte</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>onoff</Name>
					<Type>RtBoolean</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Bound</SubSubSection>

		<Procedure>
			<Name>Bound</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>bound</Name>
					<Type>RtBound</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Detail</SubSubSection>

		<Procedure>
			<Name>Detail</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>bound</Name>
					<Type>RtBound</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>DetailRange</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>offlow</Name>
					<Type>RtFloat</Type>
					<Range><le>onlow</le></Range>
				</Argument>
				<Argument>
					<Name>onlow</Name>
					<Type>RtFloat</Type>
					<Range><le>onhigh</le></Range>
				</Argument>
				<Argument>
					<Name>onhigh</Name>
					<Type>RtFloat</Type>
					<Range><le>offhigh</le></Range>
				</Argument>
				<Argument>
					<Name>offhigh</Name>
					<Type>RtFloat</Type>
				</Argument>
				<RibArgsCanBeArray/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Geometric approximation</SubSubSection>

		<Procedure>
			<Name>GeometricApproximation</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>value</Name>
					<Type>RtFloat</Type>
					<Range><ge>0</ge></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Orientation and sides</SubSubSection>

		<Procedure>
			<Name>Orientation</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>orientation</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ReverseOrientation</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Sides</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nsides</Name>
					<Type>RtInt</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Transformations</SubSection>

		<Procedure>
			<Name>Identity</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Transform</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>transform</Name>
					<Type>RtMatrix</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ConcatTransform</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>transform</Name>
					<Type>RtMatrix</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Perspective</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>fov</Name>
					<Type>RtFloat</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Translate</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>dx</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dy</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dz</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Rotate</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>angle</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dx</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dy</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dz</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Scale</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>sx</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>sy</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>sz</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Skew</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>angle</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dx1</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dy1</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dz1</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dx2</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dy2</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>dz2</Name>
					<Type>RtFloat</Type>
				</Argument>
				<RibArgsCanBeArray/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Named coordinate systems</SubSubSection>
		<Procedure>
			<Name>CoordinateSystem</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>space</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>CoordSysTransform</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>space</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>TransformPoints</Name>
			<ReturnType>RtPoint*</ReturnType>
			<Arguments>
				<Argument>
					<Name>fromspace</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>tospace</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>npoints</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>points</Name>
					<Type>RtPointArray</Type>
				</Argument>
			</Arguments>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Transformation stack</SubSubSection>
		<Procedure>
			<Name>TransformBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>TransformEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Transform/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Resources</SubSection>

		<Procedure>
			<Name>Resource</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>handle</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>	
				<ParamList/>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>ResourceBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>ResourceEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
		</Procedure>

		<SubSection>Implementation-specific Attributes</SubSection>

		<Procedure>
			<Name>Attribute</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Section>Geometric Primitives</Section>
		<SubSection>Polygons</SubSection>

		<Procedure>
			<Name>Polygon</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nvertices</Name>
					<Type>RtInt</Type>
					<RibValue>countP(pList)</RibValue>
				</Argument>
				<ParamList><Param>P</Param></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>countP(pList)</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>GeneralPolygon</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nloops</Name>
					<Type>RtInt</Type>
					<RibValue>size(nverts)</RibValue>
				</Argument>
				<Argument>
					<Name>nverts</Name>
					<Type>RtIntArray</Type>
                    <RiLength>nloops</RiLength>
				</Argument>
				<ParamList><Param>P</Param></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>sum(nverts)</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>PointsPolygons</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>npolys</Name>
					<Type>RtInt</Type>
					<RibValue>size(nverts)</RibValue>
				</Argument>
				<Argument>
					<Name>nverts</Name>
					<Type>RtIntArray</Type>
                    <RiLength>npolys</RiLength>
				</Argument>
				<Argument>
					<Name>verts</Name>
					<Type>RtIntArray</Type>
					<Length>sum(nverts)</Length>
				</Argument>
				<ParamList><Param>P</Param></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Uniform>size(nverts)</Uniform>
				<Varying>max(verts)+1</Varying>
				<FaceVarying>sum(nverts)</FaceVarying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>PointsGeneralPolygons</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>npolys</Name>
					<Type>RtInt</Type>
					<RibValue>size(nloops)</RibValue>
				</Argument>
				<Argument>
					<Name>nloops</Name>
					<Type>RtIntArray</Type>
                    <RiLength>npolys</RiLength>
				</Argument>
				<Argument>
					<Name>nverts</Name>
					<Type>RtIntArray</Type>
					<Length>sum(nloops)</Length>
				</Argument>
				<Argument>
					<Name>verts</Name>
					<Type>RtIntArray</Type>
					<Length>sum(nverts)</Length>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Uniform>size(nloops)</Uniform>
				<Varying>max(verts)+1</Varying>
				<FaceVarying>sum(nverts)</FaceVarying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Patches</SubSection>

		<Procedure>
			<Name>Basis</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>ubasis</Name>
					<Type>RtBasis</Type>
				</Argument>
				<Argument>
					<Name>ustep</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>vbasis</Name>
					<Type>RtBasis</Type>
				</Argument>
				<Argument>
					<Name>vstep</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Patch</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
				<Vertex>strcmp(type,"bilinear")==0 ? 4 : 16</Vertex>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>PatchMesh</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>nu</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>uwrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>nv</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>vwrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<ComplicatedCustomImpl/>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>NuPatch</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nu</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>uorder</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>uknot</Name>
					<Type>RtFloatArray</Type>
					<Length>nu+uorder</Length>
				</Argument>
				<Argument>
					<Name>umin</Name>
					<Type>RtFloat</Type>
					<Range><lt>umax</lt></Range>
				</Argument>
				<Argument>
					<Name>umax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>nv</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>vorder</Name>
					<Type>RtInt</Type>
					<Range><gt>0</gt></Range>
				</Argument>
				<Argument>
					<Name>vknot</Name>
					<Type>RtFloatArray</Type>
					<Length>nv+vorder</Length>
				</Argument>
				<Argument>
					<Name>vmin</Name>
					<Type>RtFloat</Type>
					<Range><lt>vmax</lt></Range>
				</Argument>
				<Argument>
					<Name>vmax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Uniform>(1+nu-uorder+1)*(1+nv-vorder+1)</Uniform>
				<Varying>(1+nu-uorder+1)*(1+nv-vorder+1)</Varying>
				<Vertex>nu*nv</Vertex>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>TrimCurve</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nloops</Name>
					<Type>RtInt</Type>
					<RibValue>size(ncurves)</RibValue>
				</Argument>
				<Argument>
					<Name>ncurves</Name>
					<Type>RtIntArray</Type>
                    <RiLength>nloops</RiLength>
				</Argument>
				<Argument>
					<Name>order</Name>
					<Type>RtIntArray</Type>
					<Length>sum(ncurves)</Length>
				</Argument>
				<Argument>
					<Name>knot</Name>
					<Type>RtFloatArray</Type>
					<Length>sum(order)+sum(n)</Length>
				</Argument>
				<Argument>
					<Name>min</Name>
					<Type>RtFloatArray</Type>
					<Length>size(order)</Length>
				</Argument>
				<Argument>
					<Name>max</Name>
					<Type>RtFloatArray</Type>
					<Length>size(order)</Length>
				</Argument>
				<Argument>
					<Name>n</Name>
					<Type>RtIntArray</Type>
					<Length>size(order)</Length>
				</Argument>
				<Argument>
					<Name>u</Name>
					<Type>RtFloatArray</Type>
					<Length>sum(n)</Length>
				</Argument>
				<Argument>
					<Name>v</Name>
					<Type>RtFloatArray</Type>
					<Length>size(u)</Length>
				</Argument>
				<Argument>
					<Name>w</Name>
					<Type>RtFloatArray</Type>
					<Length>size(u)</Length>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Subdivision Surfaces</SubSection>

		<Procedure>
			<Name>SubdivisionMesh</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>scheme</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>nfaces</Name>
					<Type>RtInt</Type>
					<RibValue>size(nvertices)</RibValue>
				</Argument>
				<Argument>
					<Name>nvertices</Name>
					<Type>RtIntArray</Type>
                    <RiLength>nfaces</RiLength>
				</Argument>
				<Argument>
					<Name>vertices</Name>
					<Type>RtIntArray</Type>
					<Length>sum(nvertices)</Length>
				</Argument>
				<Argument>
					<Name>ntags</Name>
					<Type>RtInt</Type>
					<RibValue>size(tags)</RibValue>
				</Argument>
				<Argument>
					<Name>tags</Name>
					<Type>RtTokenArray</Type>
                    <RiLength>ntags</RiLength>
				</Argument>
				<Argument>
					<Name>nargs</Name>
					<Type>RtIntArray</Type>
					<Length>2*size(tags)</Length>
				</Argument>
				<Argument>
					<Name>intargs</Name>
					<Type>RtIntArray</Type>
					<Length>sum(nargs,0,2)</Length>
				</Argument>
				<Argument>
					<Name>floatargs</Name>
					<Type>RtFloatArray</Type>
					<Length>sum(nargs,1,2)</Length>
				</Argument>
				<ParamList/>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Uniform>size(nvertices)</Uniform>
				<Varying>max(vertices)+1</Varying>
				<FaceVarying>sum(nvertices)</FaceVarying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Quadrics</SubSection>

		<Procedure>
			<Name>Sphere</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>radius</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>zmin</Name>
					<Type>RtFloat</Type>
					<Range><lt>zmax</lt></Range>
				</Argument>
				<Argument>
					<Name>zmax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Cone</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>height</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>radius</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Cylinder</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>radius</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>zmin</Name>
					<Type>RtFloat</Type>
					<Range><ne>zmax</ne></Range>
				</Argument>
				<Argument>
					<Name>zmax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Hyperboloid</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>point1</Name>
					<Type>RtPoint</Type>
				</Argument>
				<Argument>
					<Name>point2</Name>
					<Type>RtPoint</Type>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Paraboloid</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>rmax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>zmin</Name>
					<Type>RtFloat</Type>
					<Range><ne>zmax</ne></Range>
				</Argument>
				<Argument>
					<Name>zmax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Disk</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>height</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>radius</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Torus</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>majorrad</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>minorrad</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<Argument>
					<Name>phimin</Name>
					<Type>RtFloat</Type>
					<Range><ne>phimax</ne></Range>
				</Argument>
				<Argument>
					<Name>phimax</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>thetamax</Name>
					<Type>RtFloat</Type>
					<Range><ne>0</ne></Range>
				</Argument>
				<RibArgsCanBeArray/>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>4</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Points and Curve Primitives</SubSection>

		<Procedure>
			<Name>Points</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>npoints</Name>
					<Type>RtInt</Type>
					<RibValue>countP(pList)</RibValue>
				</Argument>
				<ParamList><Param>P</Param></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>countP(pList)</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>Curves</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>ncurves</Name>
					<Type>RtInt</Type>
					<RibValue>size(nvertices)</RibValue>
				</Argument>
				<Argument>
					<Name>nvertices</Name>
					<Type>RtIntArray</Type>
                    <RiLength>ncurves</RiLength>
				</Argument>
				<Argument>
					<Name>wrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Param>P</Param></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<ComplicatedCustomImpl/>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Blobby Implicit Surfaces</SubSection>

		<Procedure>
			<Name>Blobby</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>nleaf</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>ncode</Name>
					<Type>RtInt</Type>
					<RibValue>size(code)</RibValue>
				</Argument>
				<Argument>
					<Name>code</Name>
					<Type>RtIntArray</Type>
                    <RiLength>ncode</RiLength>
				</Argument>
				<Argument>
					<Name>nfloats</Name>
					<Type>RtInt</Type>
					<RibValue>size(floats)</RibValue>
				</Argument>
				<Argument>
					<Name>floats</Name>
					<Type>RtFloatArray</Type>
                    <RiLength>nfloats</RiLength>
				</Argument>
				<Argument>
					<Name>nstrings</Name>
					<Type>RtInt</Type>
					<RibValue>size(strings)</RibValue>
				</Argument>
				<Argument>
					<Name>strings</Name>
					<Type>RtTokenArray</Type>
                    <RiLength>nstrings</RiLength>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<Varying>nleaf</Varying>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Procedural Primitives</SubSection>

		<Procedure>
			<Name>Procedural</Name>
			<ReturnType>RtVoid</ReturnType>
			<RibSpecial/>
			<Arguments>
				<Argument>
					<Name>data</Name>
					<Type>RtPointer</Type>
				</Argument>
				<Argument>
					<Name>bound</Name>
					<Type>RtBound</Type>
				</Argument>
				<Argument>
					<Name>refineproc</Name>
					<Type>RtProcSubdivFunc</Type>
				</Argument>
				<Argument>
					<Name>freeproc</Name>
					<Type>RtProcFreeFunc</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ProcFree</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>data</Name>
					<Type>RtPointer</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ProcDelayedReadArchive</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>data</Name>
					<Type>RtPointer</Type>
				</Argument>
				<Argument>
					<Name>detail</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ProcRunProgram</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>data</Name>
					<Type>RtPointer</Type>
				</Argument>
				<Argument>
					<Name>detail</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ProcDynamicLoad</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>data</Name>
					<Type>RtPointer</Type>
				</Argument>
				<Argument>
					<Name>detail</Name>
					<Type>RtFloat</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<SubSection>Implementation-specific Geometric Primitives</SubSection>

		<Procedure>
			<Name>Geometry</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<IClassLengths>
				<!-- can't validate this automatically. -->
				<ComplicatedCustomImpl/>
			</IClassLengths>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Soids and Spatial Set Operations</SubSection>

		<Procedure>
			<Name>SolidBegin</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>SolidEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Solid/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Retained Geometry</SubSection>

		<Procedure>
			<Name>ObjectBegin</Name>
			<ReturnType>RtObjectHandle</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
					<AltTypeInt/>
					<RibOnly/>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ObjectEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ObjectInstance</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>handle</Name>
					<Type>RtObjectHandle</Type>
					<RibValue/>
				</Argument>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
					<AltTypeInt/>
					<RibOnly/>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Section>Motion</Section>

		<Procedure>
			<Name>MotionBegin</Name>
			<ApiNote>The MotionBegin/MotionBeginV split doesn't imply a paramList
			- instead it's an odd and ugly edge case in the spec.</ApiNote>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>N</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>...</Name>
					<Type> </Type>
				</Argument>
			</Arguments>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>MotionBegin</Name>
			<CName>RiMotionBeginV</CName>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>N</Name>
					<Type>RtInt</Type>
					<RibValue>size(times)</RibValue>
				</Argument>
				<Argument>
					<Name>times</Name>
					<Type>RtFloatArray</Type>
                    <RiLength>N</RiLength>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>MotionEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
			<ValidScope>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Section>External Resources</Section>
		<SubSection>Texture Map Utilities</SubSection>
		<SubSubSection>Making texture maps</SubSubSection>

		<Procedure>
			<Name>MakeTexture</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>imagefile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>texturefile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>swrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>twrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>filterfunc</Name>
					<Type>RtFilterFunc</Type>
				</Argument>
				<Argument>
					<Name>swidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<Argument>
					<Name>twidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>MakeBump</Name>
			<ReturnType>RtVoid</ReturnType>
			<Deprecated/>
			<Arguments>
				<Argument>
					<Name>imagefile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>bumpfile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>swrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>twrap</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>filterfunc</Name>
					<Type>RtFilterFunc</Type>
				</Argument>
				<Argument>
					<Name>swidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<Argument>
					<Name>twidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Making environment maps</SubSubSection>
		<Procedure>
			<Name>MakeLatLongEnvironment</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>imagefile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>reflfile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>filterfunc</Name>
					<Type>RtFilterFunc</Type>
				</Argument>
				<Argument>
					<Name>swidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<Argument>
					<Name>twidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>MakeCubeFaceEnvironment</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>px</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>nx</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>py</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>ny</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>pz</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>nz</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>reflfile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>fov</Name>
					<Type>RtFloat</Type>
				</Argument>
				<Argument>
					<Name>filterfunc</Name>
					<Type>RtFilterFunc</Type>
				</Argument>
				<Argument>
					<Name>swidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<Argument>
					<Name>twidth</Name>
					<Type>RtFloat</Type>
					<Range><ge>1</ge></Range>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSubSection>Making shadow maps</SubSubSection>
		<Procedure>
			<Name>MakeShadow</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>picfile</Name>
					<Type>RtString</Type>
				</Argument>
				<Argument>
					<Name>shadowfile</Name>
					<Type>RtString</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>MakeOcclusion</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>npics</Name>
					<Type>RtInt</Type>
					<RibValue>size(picfiles)</RibValue>
				</Argument>
				<Argument>
					<Name>picfiles</Name>
					<Type>RtStringArray</Type>
                    <RiLength>npics</RiLength>
				</Argument>
				<Argument>
					<Name>shadowfile</Name>
					<Type>RtString</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
			<ValidScope>
				<BeginEnd/>
				<Frame/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<SubSection>Errors</SubSection>

		<Procedure>
			<Name>ErrorHandler</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>handler</Name>
					<Type>RtErrorFunc</Type>
				</Argument>
			</Arguments>
			<Rib/>
			<ValidScope>
				<Outside/>
				<BeginEnd/>
				<Frame/>
				<World/>
				<Attribute/>
				<Transform/>
				<Solid/>
				<Object/>
				<Motion/>
				<Archive/>
			</ValidScope>
		</Procedure>

		<Procedure>
			<Name>ErrorIgnore</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>code</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>severity</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>message</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ErrorPrint</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>code</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>severity</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>message</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ErrorAbort</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>code</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>severity</Name>
					<Type>RtInt</Type>
				</Argument>
				<Argument>
					<Name>message</Name>
					<Type>RtString</Type>
				</Argument>
			</Arguments>
		</Procedure>

		<SubSection>Archive Files</SubSection>

		<Procedure>
			<Name>ArchiveRecord</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>type</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>format</Name>
					<Type>char *</Type>
				</Argument>
				<Argument>
					<Name>...</Name>
					<Type> </Type>
				</Argument>
			</Arguments>
		</Procedure>

		<Procedure>
			<Name>ReadArchive</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<Argument>
					<Name>callback</Name>
					<Type>RtArchiveCallback</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>ArchiveBegin</Name>
			<ReturnType>RtArchiveHandle</ReturnType>
			<Arguments>
				<Argument>
					<Name>name</Name>
					<Type>RtToken</Type>
				</Argument>
				<ParamList><Optional/></ParamList>
			</Arguments>
			<Rib/>
		</Procedure>

		<Procedure>
			<Name>ArchiveEnd</Name>
			<ReturnType>RtVoid</ReturnType>
			<Arguments/>
			<Rib/>
		</Procedure>

	</Procedures>
</RiAPI>
