The jit.gl.pass 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 jit.gl.pass objects.
Each JXP file contains one or more <pass> effects. Each pass-effect contains one or more <subpass> tags. The <subpass> specifies a shader file for processing its pass, using the "file" attribute, or a jit.gl.pix gen file using the "gen" attribute and contains one or more <input> tags. Certain attributes of jit.gl.slab or jit.gl.pix can also be set here (e.g. dimscale, rect). The subpass can also contain a "name" 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 "inputs" and "outputs" attributes.
The input specifies its texture source by setting either "name", "source", or "subpass". Name can be any named texture, subpass can be any named subpass, and source can be one of the following:
COLOR - the jit.gl.node color render target (or color output of previous jit.gl.pass)
NORMALS - the jit.gl.node normals render target + depth in alpha channel
VELOCITY - the jit.gl.node velocity render target
PREVIOUS - the preceding subpass output
HISTORY - the previous jit.gl.pass output
TEXTURE0..N - the jit.gl.pass texture attribute list of texture names
SUBPASS0..N - any subpass output of the current jit.gl.pass
Texture and subpass indexing starts at 0, so SUBPASS0 refers to the first subpass output, SUBPASS1 the second and so on.
The output index of a multi-output subpass input type is specified using an "output" 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.
Both "output" and "history" only work on "subpass" type inputs.
;<input subpass="mysubpass" output="1" history="1" />
Pass effects that request NORMALS or VELOCITY as input sources require jit.gl.material or jit.gl.pbr objects bound to any geometry objects in the scene. These effects include depth , dof , motionblur , and ssao .
For an example of creating custom pass effects, see the pass.custom.effects example patch.
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 <pass> effects linking to corresponding examples :
atmospheric - Atmospheric scattering and ground fog
bloom - Produce atmospheric light extending along the borders of bright areas
depth - Depth Blending effect
fxaa - Fast approximate anti aliasing
gamma - Tone mapping, gamma correction and dithering noise pass
motionblur - Blur effect based on pixel velocity
motionglitch - Data mosh type glitch effects
smear example - Pixel smearing effect
ssao - Screen-space ambient occlusion
ssr - Screen-space reflection approximation
tonemap - Modify tonal value of pixels
tssao-gi - Temporal screen-space ambient occlusion with global illumination
tssao-gi-ssr - Temporal screen-space ambient occlusion with global illumination and screen-space reflections
The child jit.gl.pass name (default = none). Set automatically by patchcord connection, and manually by providing a valid jit.gl.pass object name.
Depth drawto gl context name. Unless set by user, depth_drawto equals drawto
JXP file name (default = none)
Output texture name (default = UID). If there is a name collison then the UID will be appended to the name that is in conflict.
Internal texture quality (deault = med). Changeing quality changes the type attribute of internal jit.gl.texture objects.
'lo' ( type = char )
'med' ( type = float16 )
'hi' ( type = float32 )
Common Box Attributes
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background [int] (default: 0)
Adds or removes the object from the patcher's background layer.adds the object to the background layer, removes it. Objects in the background layer are shown behind all objects in the default foreground layer.
color [4 floats]
Sets the color for the object box outline.
Sets the type style used by the object. The options are:
bold italic Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
Sets the object's font.
Sets the object's font size (in points).
hidden [int] (default: 0)
Toggles whether an object is hidden when the patcher is locked.
Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.
ignoreclick [int] (default: 0)
Toggles whether an object ignores mouse clicks in a locked patcher.
JS Painter File
patching_rect [4 floats] (default: 0. 0. 100. 0.)
Sets the position and size of the object in the patcher window.
position [2 floats]
Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.
presentation [int] (default: 0)
Sets whether an object belongs to the patcher's presentation.
presentation_rect [4 floats] (default: 0. 0. 0. 0.)
Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.
rect [4 floats]
Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).
size [2 floats]
Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.
textcolor [4 floats]
Sets the color for the object's text in RGBA format.
Sets the justification for the object's text.
0 = 'left'
1 = 'center'
2 = 'right'
Automatic rendering flag (default = 1) When the flag is set, rendering occurs when the associated jit.gl.render object receives a bang message
The name of a texture to be rendered to - e.g.will capture to .
The named drawing context in which to draw (default = none) A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it.
Enable flag (default = 1) When the flag is set, drawing is enabled.
Object layer number (default = 0) When in automatic mode, the layer number determines the rendering order (low to high). Objects in the same layer have no guarantee which will be rendered first.
The instance name (default = UID)
Mode for automatic generation of texture coordinate controls (default = 0)
0 = no coordinates are generated.
1 = OpenGL's texture generation is used with mode GL_OBJECT_LINEAR. This applies the texture in a fixed orientation relative to the object.
2 = OpenGL's texture generation is used with mode GL_SPHERE_MAP. This can be used to create a reflection effect.
3 = OpenGL's texture generation is used with mode GL_EYE_LINEAR. This applies the texture in a fixed orientation relative to OpenGL's eye coordinates.
Modes 1 and 3 are affected by the value of the tex_plane_s and tex_plane_t attributes listed below.
tex_plane_s [4 floats]
The texture generation coefficients a b c d that apply to tex_map modes 1 and 3. (default = 1. 0. 0. 0.)
The four coefficients define a plane used to generate the s texture coordinate, which corresponds to the x axis of the texture image. If the tex_map mode is 1, s = ax + by + cz + dw, where x, y, z, and w are the homogeneous coordinates of the vertex.
tex_plane_t [4 floats]
The texture generation coefficients a b c d, which apply to tex_map modes 1 and 3. (default = 0. 1. 0. 0)
The four coefficients define a plane which is used to generate the t texture coordinate, which corresponds to the y axis of the texture image.
The name of the shader to be applied (default = none)
texture [8 symbols]
The name of the texture to be applied (default = none). If multiple textures are specified, uses multi-texturing.
|Working with OpenGL||Working with OpenGL|
|jit.gl.node||Create hierarchical rendering groups|
|jit.gl.slab||Process texture data|
|jit.gl.pix||Generates pixel processing shaders from a gen patcher|
|jit.gl.shader||Manage a GL shader|
|jit.gl.camera||Set a rendering view|
|jit.gl.light||Place a light source in a 3D scene|
|External Text Editor||External Text Editor|