jit.gl.pass
Render scene passes with shader processing
Description
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.
Discussion
For a detailed discussion of the JXP file format see the Render Passes user guide.
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-hq
- Produce atmospheric light extending along the borders of bright areas
fxaa
- Fast approximate anti aliasing
gamma
- Tone mapping, gamma correction and dithering noise pass
motionblur-hq
- Blur effect based on pixel velocity
motionglitch
- Data mosh type glitch effects
smear
- 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
dof-hq
- High quality depth of field with bokeh parameters and auto-focus
taa
- Temporal anti aliasing
gi
- Global illumination via ReSTIR
vignette
- Cinematic vignette
grain
- Film grain
Attributes
amount[4 floats]
This attribute is only used by the default pass effect to control the blending amount.
autowatch[int]
9.0.0
Enable watching for changes in the source file (default = 1). When file watching is on, the file is recompiled automatically when it is modified. This allows you to use an external editor for your file.
child[symbol]
The child jit.gl.pass name (default = none). Set automatically by patchcord connection, and manually by providing a valid jit.gl.pass object name.
embed[int]
9.0.0
When enabled, the shader file is saved with its patcher. If the object is loaded in a patch with no file argument, embed is enabled by default. If a file argument is provided, embed will be disabled unless explicitly enabled by the user.
file[symbol]
JXP file name (default = none)
fxname[symbol]
Load a named pass effect. Several built-in pass effects are available to load from this menu, listed below. Custom pass effects from Packages can also be loaded. The jxp files for these effects must be located in a media/jitter/passes folder inside the package folder. Toggling fxname will override the file attribute.
Possible values:
'atmospheric'
'bloom'
'bloom-tonemap'
'bloom-hq'
'depth'
'depth2pass'
'dof'
'dof-hq'
'fxaa'
'gamma'
'grain'
'motionblur-hq'
'motionblur'
'motion-gauss-blur'
'motionglitch'
'motionglitch-ext'
'gi'
'smear'
'ssao'
'ssao-gl2'
'ssr'
'taa'
'tonemap'
'tssao-gi-ssr'
'tssao-gi'
'vignette'
out_name[symbol]
read-only
Output texture name (default = UID). If there is a name collison then the UID will be appended to the name that is in conflict.
quality[symbol]
Internal texture quality (deault = med). Changeing quality changes the type attribute of internal jit.gl.texture objects.
Possible values:
'med'
(
type = float16
)
'hi'
(
type = float32
)
OB3D Attributes
automatic[int]
Automatic rendering flag (default = 1) When the flag is set, rendering occurs when the associated jit.gl.render object receives a bang message
drawto[symbol]
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[int]
Enable flag (default = 1) When the flag is set, drawing is enabled.
layer[int]
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.
name[symbol]
The instance name (default = UID)
texture[8 symbols]
The name of the texture to be applied (default = none). If multiple textures are specified, uses multi-texturing.
Common Box Attributes
annotation[symbol]
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background[int]: 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.
fontface[int]
Sets the type style used by the object. The options are:
plain
bold
italic
bold italic
Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
fontname[symbol]
Sets the object's font.
fontsize[float]
Sets the object's font size (in points).
Possible values:
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'
hint[symbol]
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]: 0
Toggles whether an object ignores mouse clicks in a locked patcher.
jspainterfile[symbol]
You can override the default appearance of a user interface object by assigning a JavaScript file with code for painting the object. The file must be in the search path.
patching_rect[4 floats]: 0. 0. 100. 0.
Sets the position and size of the object in the patcher window.
position[2 floats]
write-only
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]: 0
Sets whether an object belongs to the patcher's presentation.
presentation_rect[4 floats]: 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]
write-only
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]
write-only
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.
textjustification[int]
Sets the justification for the object's text.
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
valuepopup[int]: 0
For objects with single values, enabling valuepopup will display the object's current value in a popup caption when the mouse is over the object or it is being changed with the mouse.
valuepopuplabel[int]: 0
Sets the source of a text label shown in a value popup caption.
Possible values:
0 = 'None'
1 = 'Hint'
2 = 'Scripting Name'
3 = 'Parameter Long Name'
4 = 'Parameter Short Name'
varname[symbol]
Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.
Messages
anything
Get and set dynamic attributes generated from sub-pass shader parameters.
(drag)
Drag and drop a .jxp file
(mouse)
Open the JXP file
param
Sets the given shader parameter with the given atom values as defined in a JXS (Jitter shader) file.
read
Load a JXP file from disk
OB3D Messages
bang
Equivalent to the
message.
draw
Draws the object in the named drawing destination. If the matrixoutput attribute is supported and set to 1, the geometry matrices are sent out the object's left outlet.
drawraw
Equivalent to inherit_all attribute set to 1.
with the
drawimmediate
Equivalent to
but ignoring any potential renderer setup
jit_gl_texture
Binds the texture specified by texture-name to this object. Equivalent to setting the texture attribute to texture-name .
- texture-name
[symbol]
See Also
Name | Description |
---|---|
Render Passes | Render Passes |
External Text Editor | External Text Editor |
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 |