<?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.environment" module="" category="">
	<digest>
		Manage environment textures for image-based lighting (IBL)
	</digest>
	<description>
		The <o>jit.gl.environment</o> object utilizes internal <o>jit.gl.cubemap</o> and <o>jit.openexr</o> objects for loading and uploading equirectangular exr environment maps. Once loaded the data is converted as needed and passed to requesting objects. Environments are bound to <o>jit.gl.node</o> sub-contexts, and only a single environment can be active in the sub-context at a time.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			glcore
		</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>
				jit.gl.environment output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output the cubemap texture name
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="(drag)">
			<digest>
				Drag and drop image files for envirnoment map processing
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="activate">
			<arglist />
			<digest>
				Make the active environment
			</digest>
			<description>
				In contexts where multiple enironments are enabled, only a single environment can be active at a time. This message tells the context to make this environment the active one. The <at>enable</at> attribute must be on to make active.
			</description>
		</method>
		<method name="jit_gl_texture">
			<arglist />
			<digest>
				Upload the named texture data to the cubemap for envirnoment map processing
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="read">
			<arglist />
			<digest>
				Read in an image file for envirnoment map processing
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="adapt" get="1" set="1" type="int" size="1">
			<digest>
				Adapt internal cubemap to input file dimensions
			</digest>
			<description>
				Adapt the internal cubemap to input file dimensions on load (default = 1). Only effective when the internal cubemap is in use. When enabled <at>edge_length</at> has no effect.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Adapt" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="drawto" get="1" set="1" type="symbol" size="1">
			<digest>
				The named context or sub-context drawing destination
			</digest>
			<description>
				The named context or sub-context drawing destination. When set, any supporting objects in the same (sub)context will have access to this envirnoment.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Drawto" />
			</attributelist>
		</attribute>
		<attribute name="edge_length" get="1" set="1" type="int" size="1">
			<digest>
				Set length of the cubemap edge
			</digest>
			<description>
				Set length of the cubemap edge (default = 64). Only effective when <at>adapt</at> is disabled and the internal cubemap is in use.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Edge Length" />
			</attributelist>
		</attribute>
		<attribute name="enable" get="1" set="1" type="int" size="1">
			<digest>
				Enable the environment map
			</digest>
			<description>
				Enable the environment map for access by supporting objects in the same (sub)context (default = 1). Only a single envirnoment map can be active at a time, see the <m>activate</m> message for a convenient way to switch between enabled envirnoment maps.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Enable Environment" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="file" get="1" set="1" type="symbol" size="1">
			<digest>
				Set an image file to read with the internal cubemap
			</digest>
			<description>
				Set an image file to read with the internal cubemap for envirnoment map processing.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="File" />
			</attributelist>
		</attribute>
		<attribute name="gamma_correction" get="1" set="1" type="int" size="1">
			<digest>
				Enable gamma correction
			</digest>
			<description>
				Enable gamma correction on the input (default = 1). Only effective when the internal cubemap is in use. Changing this value requires a re-load of the input file to have an effect.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Gamma Correction" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="name" get="1" set="0" type="symbol" size="1">
			<digest>
				Environment map name
			</digest>
			<description>
				TEXT_HERE
			</description>
		</attribute>
		<attribute name="reflect_edge" get="1" set="1" type="int" size="1">
			<digest>
				Reflection Map Edge Length
			</digest>
			<description>
				Set the length of the generated reflection map edge (default = 128). Higher values improve the resolution and perceived quality of PBR reflections (most notably on flat surfaces), at the expense of longer loading time and greater GPU memory usage. Changing this value causes the reflection map to regenerate, which will stall the renderer.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Reflection Map Edge Length" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist />
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.gl.pbr" />
		<seealso name="jit.gl.material" />
		<seealso name="jit.gl.cubemap" />
		<seealso name="jit.gl.skybox" />
		<seealso name="jit.gl.texture" />
		<seealso name="jit.openexr" />
	</seealsolist>
	<discussion>
		Supporting objects include:
		<br />
		<o>jit.gl.pbr</o>
		<br />
		<o>jit.gl.material</o>
		<br />
		<o>jit.gl.skybox</o>
		<br />
		<br />
		When used with PBR, irradiance and reflection maps are generated for IBL effects.
		<br />
		<br />
		The object will process cubemaps based on requests from the supporting objects. The cubemap will either be stored internally, if loaded via <m>read</m> or <m>jit_matrix</m> messages, or external as the result of a <m>jit_gl_texture</m> message.
	</discussion>
</c74object>
