<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.gl.pass" module="jit" category="Jitter Code Generation">
	<digest>
		Render scene passes with shader processing
	</digest>
	<description>
		The <o>jit.gl.pass</o> object encapsulates processing of one or more sub-passes. A sub-pass consists of a single frame of gl, and post-processing shader, and is defined in a xml pass description file (JXP). Complex scene-processing hierarchies can be obtained by chaining multiple <o>jit.gl.pass</o> objects.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				messages to this 3d object
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				texture output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				connect to child jit.gl.pass objects
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--OB3D-->
	<OB3D />
	<!--MESSAGES-->
	<methodlist>
		<method name="anything">
			<arglist />
			<digest>
				Dynamic attributes
			</digest>
			<description>
				Get and set dynamic attributes generated from sub-pass shader parameters.
			</description>
		</method>
		<method name="(drag)">
			<digest>
				Drag and drop a .jxp file
			</digest>
			<description>
				Drag and drop a .jxp file
			</description>
		</method>
		<method name="(mouse)">
			<digest>
				Open the JXP file
			</digest>
			<description>
				Open the JXP file
			</description>
		</method>
		<method name="open">
			<arglist />
			<digest>
				Open the JXP file
			</digest>
			<description>
				Open the JXP file
			</description>
		</method>
		<method name="param">
			<arglist />
			<digest>
				Sets the given shader parameter with the given atom values as defined in a JXS (Jitter shader)
			</digest>
			<description>
				Sets the given shader parameter with the given atom values as defined in a JXS (Jitter shader) file.
			</description>
		</method>
		<method name="read">
			<arglist />
			<digest>
				Load a JXP file from disk
			</digest>
			<description>
				Load a JXP file from disk
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="draw" />
		<jittermethod name="drawimmediate" />
		<jittermethod name="drawraw" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="get_shader" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="jit_gl_texture" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="child" get="1" set="1" type="symbol" size="1">
			<digest>
				Child jit.gl.pass name
			</digest>
			<description>
				The child jit.gl.pass name (default = none). Set automatically by patchcord connection, and manually by providing a valid jit.gl.pass object name.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Child" />
			</attributelist>
		</attribute>
		<attribute name="depth_drawto" get="1" set="0" type="symbol" size="1">
			<digest>
				Depth drawto context name
			</digest>
			<description>
				Depth drawto gl context name. Unless set by user, depth_drawto equals <at>drawto</at> 
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Depth Drawto" />
			</attributelist>
		</attribute>
		<attribute name="file" get="1" set="1" type="symbol" size="1">
			<digest>
				JXP file name
			</digest>
			<description>
				JXP file name (default = none)
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="File" />
			</attributelist>
		</attribute>
		<attribute name="out_name" get="1" set="0" type="symbol" size="1">
			<digest>
				Output texture name
			</digest>
			<description>
				Output texture name (default = UID). If there is a name collison then the UID will be appended to the name that is in conflict.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Out Name" />
			</attributelist>
		</attribute>
		<attribute name="quality" get="1" set="1" type="symbol" size="1">
			<digest>
				Texture quality
			</digest>
			<description>
				Internal texture quality (deault = med). Changeing quality changes the <at>type</at> attribute of internal <o>jit.gl.texture</o> objects.
			</description>
			<attributelist>
				<attribute name="basic" get="1" set="1" type="int" size="1" value="1" />
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="lo">
							<digest>
								type = char
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="med">
							<digest>
								type = float16
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hi">
							<digest>
								type = float32
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Quality" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="automatic" />
		<jitterattribute name="capture" />
		<jitterattribute name="drawto" />
		<jitterattribute name="enable" />
		<jitterattribute name="layer" />
		<jitterattribute name="material" />
		<jitterattribute name="name" />
		<jitterattribute name="shader" />
		<jitterattribute name="tex_map" />
		<jitterattribute name="tex_plane_s" />
		<jitterattribute name="tex_plane_t" />
		<jitterattribute name="texanchor" />
		<jitterattribute name="texrotate" />
		<jitterattribute name="texture" />
		<jitterattribute name="texzoom" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="Render scene passes with shader processing" img="jit.gl.pass.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.gl.node" />
		<seealso name="jit.gl.slab" />
		<seealso name="jit.gl.pix" />
		<seealso name="jit.gl.shader" />
		<seealso name="jit.gl.camera" />
		<seealso name="jit.gl.light" />
		<seealso name="external_editor" module="core" type="vignette" />
	</seealsolist>
	<discussion>
		Each JXP file contains one or more &lt;pass&gt; effects. Each pass-effect contains one or more &lt;subpass&gt; tags. The &lt;subpass&gt; specifies a shader file for processing its pass, using the &quot;file&quot; attribute, or a <o>jit.gl.pix</o> gen file using the &quot;gen&quot; attribute and contains one or more &lt;input&gt; tags. Certain attributes of <o>jit.gl.slab</o> or <o>jit.gl.pix</o> can also be set here (e.g. <at>dimscale</at>, <at>rect</at>). The subpass can also contain a &quot;name&quot; attribute, allowing it to be referred to as an input for other subpasses. The number of input and output textures processed by the subpass can be specified by &quot;inputs&quot; and &quot;outputs&quot; attributes.
		<br />
		<br />
		The input specifies its texture source by setting either &quot;name&quot;, &quot;source&quot;, or &quot;subpass&quot;. Name can be any named texture, subpass can be any named subpass, and source can be one of the following:
		<br />
		COLOR - the <o>jit.gl.node</o> color render target (or color output of previous jit.gl.pass)
		<br />
		NORMALS - the <o>jit.gl.node</o> normals render target + depth in alpha channel
		<br />
		VELOCITY - the <o>jit.gl.node</o> velocity render target
		<br />
		PREVIOUS - the preceding subpass output
		<br />
		HISTORY - the previous jit.gl.pass output
		<br />
		TEXTURE0..N - the jit.gl.pass texture attribute list of texture names
		<br />
		SUBPASS0..N - any subpass output of the current jit.gl.pass
		<br />
		Texture and subpass indexing starts at 0, so <i>SUBPASS0</i> refers to the first subpass output, <i>SUBPASS1</i> the second and so on.
		<br />
		<br />
		The output index of a multi-output subpass input type is specified using an &quot;output&quot; attribute and 0-based indexing. The previous frame of supass input types can be requested using the history keyword and setting it to 1. For example to set second output of the previous frame as the input.
		<code>
			&lt;input subpass=&quot;mysubpass&quot; output=&quot;1&quot; history=&quot;1&quot; /&gt;
		</code>
		Both &quot;output&quot; and &quot;history&quot; only work on &quot;subpass&quot; type inputs.
		<br />
		<br />
		Pass effects that request NORMALS or VELOCITY as input sources require <o>jit.gl.material</o> or <o>jit.gl.pbr</o> objects bound to any geometry objects in the scene. These effects include <i>depth</i>, <i>dof</i>, <i>motionblur</i>, and <i>ssao</i>.		<br />
		<br />
		For an example of creating custom pass effects, see the
		<openfilelink filename="pass.custom.effects.maxpat">
			pass.custom.effects
		</openfilelink>
		example patch.
		<br />
		<br />
		Read in JXP files by their pass name using @fxname. This is not the same as the filename, and is determined by the pass name in the JXP file. Below are included &lt;pass&gt; effects linking to corresponding examples :
		<br />
		<br />
		<openfilelink filename="pass.atmospheric.fog.maxpat">
			atmospheric
		</openfilelink>
		- Atmospheric scattering and ground fog
		<br />
		<openfilelink filename="pass.bloom.maxpat">
			bloom
		</openfilelink>
		- Produce atmospheric light extending along the borders of bright areas
		<br />
		<openfilelink filename="pass.rebuild.depth.maxpat">
			depth
		</openfilelink>
		- Depth Blending effect
		<br />
		<openfilelink filename="pass.scene.process.maxpat">
			fxaa
		</openfilelink>
		- Fast approximate anti aliasing
		<br />
		<openfilelink filename="pass.gamma.correction.maxpat">
			gamma
		</openfilelink>
		- Tone mapping, gamma correction and dithering noise pass
		<br />
		<openfilelink filename="pass.motionblur.maxpat">
			motionblur
		</openfilelink>
		- Blur effect based on pixel velocity
		<br />
		<openfilelink filename="pass.motion.glitch.maxpat">
			motionglitch
		</openfilelink>
		- Data mosh type glitch effects
		<br />
		<openfilelink filename="pass.smear.maxpat">
			smear example
		</openfilelink>
		- Pixel smearing effect
		<br />
		<openfilelink filename="pass.ssao.glcore.maxpat">
			ssao
		</openfilelink>
		- Screen-space ambient occlusion
		<br />
		<openfilelink filename="pass.tssao.gi.ssr.maxpat">
			ssr
		</openfilelink>
		- Screen-space reflection approximation
		<br />
		<openfilelink filename="pass.tonemap.maxpat">
			tonemap
		</openfilelink>
		- Modify tonal value of pixels
		<br />
		<openfilelink filename="pass.tssao.gi.ssr.maxpat">
			tssao-gi
		</openfilelink>
		- Temporal screen-space ambient occlusion with global illumination
		<br />
		<openfilelink filename="pass.tssao.gi.ssr.maxpat">
			tssao-gi-ssr
		</openfilelink>
		- Temporal screen-space ambient occlusion with global illumination and screen-space reflections
	</discussion>
</c74object>
