<?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.light" module="jit" category="Jitter OpenGL">
	<digest>
		Place a light source in a 3D scene
	</digest>
	<description>
		Contains the properties needed to define a light source in OpenGL. These include light type (directional, point and spot), light color, attenuation, and spot angle and falloff. In addition a position (for point and spot) and orientation (for directional and spot) can be defined for a virtual light in 3D space.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<!--OUTLETS-->
	<!--OB3D-->
	<OB3D />
	<!--MESSAGES-->
	<methodlist>
		<method name="sendoutput">
			<arglist />
			<digest>
				Send the shadow output texture a message
			</digest>
			<description>
				Send the shadow output texture a message
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="anim_grow" />
		<jittermethod name="anim_move" />
		<jittermethod name="anim_reset" />
		<jittermethod name="anim_turn" />
		<jittermethod name="draw" />
		<jittermethod name="drawimmediate" />
		<jittermethod name="drawraw" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="importattrs" />
		<jittermethod name="summary" />
		<jittermethod name="update_node" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="ambient" get="1" set="1" type="float" size="4">
			<digest>
				Ambient light setting
			</digest>
			<description>
				The color and opacity of the ambient light component in the form red green blue opacity (default = 0. 0. 0. 1. (opaque black)) All values should be in the range 0.-1.
			</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="Ambient" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="atten_const" get="1" set="1" type="float" size="1">
			<digest>
				Attenuation constant
			</digest>
			<description>
				The constant factor in the attenuation formula: 1.0 means never attenuate, 0.0 is complete attenuation. The attenuation parameters determine how the light source diminishes with distance.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Atten Constant" />
			</attributelist>
		</attribute>
		<attribute name="atten_linear" get="1" set="1" type="float" size="1">
			<digest>
				Attenuation linear factor
			</digest>
			<description>
				The linear factor in the attenuation formula: 1 means attenuate evenly over the distance. The attenuation parameters determine how the light source diminishes with distance.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Atten Linear" />
			</attributelist>
		</attribute>
		<attribute name="atten_quad" get="1" set="1" type="float" size="1">
			<digest>
				Attenuation quadratic factor
			</digest>
			<description>
				The quadratic factor in the attenuation formula: adds a curvature to the attenuation formula. The attenuation parameters determine how the light source diminishes with distance.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Atten Quadratic" />
			</attributelist>
		</attribute>
		<attribute name="diffuse" get="1" set="1" type="float" size="4">
			<digest>
				Diffuse light setting
			</digest>
			<description>
				The color and opacity of the diffuse light component in the form red green blue opacity (default = 1. 1. 1. 1. (opaque white)) All values should be in the range 0.-1.
			</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="Diffuse" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="direction" get="1" set="1" type="float" size="3">
			<digest>
				Direction
			</digest>
			<description>
				Sets the direction the light points. Only applies to directional and spot lights.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Direction" />
			</attributelist>
		</attribute>
		<attribute name="lookat" get="1" set="1" type="float" size="3">
			<digest>
				Orientation (point-at)
			</digest>
			<description>
				One way to set the orientation. The light will orient so that it's local Z points to the 3D position provided. (default = 0 0 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Lookat" />
			</attributelist>
		</attribute>
		<attribute name="shadowblur" get="1" set="1" type="float" size="1">
			<digest>
				Shadow blur amount
			</digest>
			<description>
				Shadow blur amount (default = 0.2). Indicates the width of a gaussian blur performed on the shadow output texture.
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shadow Blur" />
			</attributelist>
		</attribute>
		<attribute name="shadowquality" get="1" set="1" type="symbol" size="1">
			<digest>
				Shadow quality
			</digest>
			<description>
				Shadow texture quality (default = med). Setting this value affects the <at>dim</at> and <at>type</at> of the internal <o>jit.gl.texture</o> shadow target.
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="5">
					<enumlist>
						<enum name="lo">
							<digest>
								type=float16, dim=512
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="med-lo">
							<digest>
								type=float16, dim=1024
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="med">
							<digest>
								type=float32, dim=1024
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="med-hi">
							<digest>
								type=float32, dim=2048
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="hi">
							<digest>
								type=float32, dim=4096
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shadow Quality" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="shadowrange" get="1" set="1" type="float" size="1">
			<digest>
				Shadow range
			</digest>
			<description>
				Shadow range value (default = 50.0). For directional lights, this represents the the maximum distance a shadow-caster can be from shadow-receiver. For spot/point lights the maximum range a light will affect other objects. Setting this as low as possible in the scene generally gives better shadow results.
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shadow Range" />
			</attributelist>
		</attribute>
		<attribute name="shadows" get="1" set="1" type="int" size="1">
			<digest>
				Enable shadows
			</digest>
			<description>
				Enable shadow casting from this light (default = 0).
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shadows" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="onoff" />
			</attributelist>
		</attribute>
		<attribute name="shadowtexoutname" get="1" set="0" type="symbol" size="1">
			<digest>
				Shadow texture output name
			</digest>
			<description>
				The internal shadow texture output name.
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Shadow Tex Out Name" />
			</attributelist>
		</attribute>
		<attribute name="specular" get="1" set="1" type="float" size="4">
			<digest>
				Specular light setting
			</digest>
			<description>
				Color and opacity of specular light component (default = 1. 1. 1. 1. (opaque white)) The first three floats in the range 0.-1. specify the RGB components of the specular light color. The fourth float (also in the range 0.-1.) specifies opacity.
			</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="Specular" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="rgba" />
			</attributelist>
		</attribute>
		<attribute name="spot_angle" get="1" set="1" type="float" size="1">
			<digest>
				Spot cone angle
			</digest>
			<description>
				Defines the cone angle for spot type lights (default = 90)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Spot Angle" />
			</attributelist>
		</attribute>
		<attribute name="spot_falloff" get="1" set="1" type="float" size="1">
			<digest>
				Spot falloff
			</digest>
			<description>
				Defines the rate of falloff of the light from the center, to the edges of the cone (default = 0). Only applies to spot type lights.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Spot Faloff" />
			</attributelist>
		</attribute>
		<attribute name="type" get="1" set="1" type="symbol" size="1">
			<digest>
				Light type
			</digest>
			<description>
				TEXT_HERE
			</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="point">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="directional">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="spot">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Type" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enum" />
			</attributelist>
		</attribute>
		<attribute name="viewproj_matrix" get="1" set="0" type="symbol" size="1">
			<digest>
				Shadow camera view-projection matrix
			</digest>
			<description>
				Shadow camera current view-projection matrix
			</description>
			<attributelist>
				<attribute name="introduced" get="1" set="1" type="symbol" size="1" value="7.0.0" />
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="View Proj Matrix" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="anchor" />
		<jitterattribute name="anim" />
		<jitterattribute name="animmode" />
		<jitterattribute name="axes" />
		<jitterattribute name="boundcalc" />
		<jitterattribute name="bounds" />
		<jitterattribute name="dest_dim" />
		<jitterattribute name="drawbounds" />
		<jitterattribute name="drawto" />
		<jitterattribute name="enable" />
		<jitterattribute name="filterclass" />
		<jitterattribute name="inherit_all" />
		<jitterattribute name="inherit_color" />
		<jitterattribute name="inherit_depth" />
		<jitterattribute name="inherit_fog" />
		<jitterattribute name="inherit_material" />
		<jitterattribute name="inherit_poly" />
		<jitterattribute name="inherit_texture" />
		<jitterattribute name="inherit_transform" />
		<jitterattribute name="layer" />
		<jitterattribute name="name" />
		<jitterattribute name="position" />
		<jitterattribute name="quat" />
		<jitterattribute name="rotate" />
		<jitterattribute name="rotatexyz" />
		<jitterattribute name="scale" />
		<jitterattribute name="transform_reset" />
		<jitterattribute name="viewalign" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.gl.light.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.gl.render" />
		<seealso name="jit.gl.sketch" />
		<seealso name="jit.gl.material" />
	</seealsolist>
	<discussion>
		Multiple <o>jit.gl.light</o> objects can be added to a scene, up to a maximum that is specific to your graphics card.
		<br />
		The actual appearance of 3D objects is a combination of the material properties of that object, and the color values of the <o>jit.gl.light</o> objects in the scene. The possible color values are ambient, diffuse and specular. For more information, see chapter 5 of the OpenGl Redbook. This object requires one argument: the name of a drawing context. A named drawing context is a named instance of a <o>jit.window</o>, <o>jit.pwindow</o>, or <o>jit.matrix</o> object that has an instance of the <o>jit.gl.render</o> object associated with it. Additionally it can reference the name of a <o>jit.gl.node</o> sub-context. This value may also be set via the OB3D <at>drawto</at> attribute. If no argument is present, the object is implicitly added to the first valid drawing context or sub-context found in the current patch or by searching up the patcher hierarchy.
	</discussion>
</c74object>
