Compositor: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 175: Line 175:
; condition
; condition
: A valid boolean condition to enable the pass at startup (doesn't work at runtime).
: A valid boolean condition to enable the pass at startup (doesn't work at runtime).
There are specific pass types, each with their own set of custom parameters:
* '''scene'''
Renders the scene from the point of view given by the CameraGroup.
; cull-mask
: A 32 bit number that specifies the cull mask to be used. See <tt>simgear/scene/util/RenderConstants.hxx</tt> to know which bits enable what.
; z-near and z-far
: They change the depth range to be used. If both of them are zero, the default Z range in the CameraGroup is used.
; clustered-forward
: Enables the use of clustered forward rendering for this pass.
; cubemap-face
: Ignores the given view and projection matrices and uses a custom one that renders the scene as if it was seen from inside a cubemap looking towards the specified face.
* '''quad'''
Renders a fullscreen quad with an optional [[Effects|effect]] applied. Useful for screen space shaders (like SSAO, Screen Space Reflections or bloom) and deferred rendering.
; geometry
: Specifies the x, y, width and height of the fullscreen quad inside the viewport using normalized coordinates.
; effect
: The quad will use this effect.
* '''shadow-map'''
Renders the scene from a light's point of view.
; light-num
: The OpenGL light number to use for this shadow map.
; near-m and far-m
: They specify the range of the shadow map.


Passes can render to a buffer (Render to Texture), to several buffers (Multiple Render Targets) or directly to the framebuffer. This is accomplished by the <code><attachment/></code> tag. Possible parameters of an attachment are:
Passes can render to a buffer (Render to Texture), to several buffers (Multiple Render Targets) or directly to the framebuffer. This is accomplished by the <code><attachment/></code> tag. Possible parameters of an attachment are:
Line 230: Line 203:
; condition
; condition
: A valid boolean condition to enable the binding at startup (doesn't work at runtime).
: A valid boolean condition to enable the binding at startup (doesn't work at runtime).
There are specific pass types, each with their own set of custom parameters:
==== scene ====
Renders the scene from the point of view given by the CameraGroup.
; cull-mask
: A 32 bit number that specifies the cull mask to be used. See <tt>simgear/scene/util/RenderConstants.hxx</tt> to know which bits enable what.
; z-near and z-far
: They change the depth range to be used. If both of them are zero, the default Z range in the CameraGroup is used.
; clustered-forward
: Enables the use of clustered forward rendering for this pass.
; cubemap-face
: Ignores the given view and projection matrices and uses a custom one that renders the scene as if it was seen from inside a cubemap looking towards the specified face.
==== quad ====
Renders a fullscreen quad with an optional [[Effects|effect]] applied. Useful for screen space shaders (like SSAO, Screen Space Reflections or bloom) and deferred rendering.
; geometry
: Specifies the x, y, width and height of the fullscreen quad inside the viewport using normalized coordinates.
; effect
: The quad will use this effect.
==== shadow-map ====
Renders the scene from a light's point of view.
; light-num
: The OpenGL light number to use for this shadow map.
; near-m and far-m
: They specify the range of the shadow map.


Example XML for a ''scene'' type pass:
Example XML for a ''scene'' type pass:
343

edits

Navigation menu