Compositor: Difference between revisions

531 bytes added ,  8 November 2019
no edit summary
No edit summary
No edit summary
Line 446: Line 446:
|}
|}


There are specific pass types, each with their own set of custom parameters:
There are specific pass types, each with their own set of custom parameters.


==== scene ====
==== scene ====
Renders the scene from the point of view given by the CameraGroup.
Renders the scene from the point of view given by the CameraGroup.
; cull-mask
{| class="wikitable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;
: 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.
! scope="col" | Parameter Name
; z-near and z-far
! scope="col" | Optional
: They change the depth range to be used. If both of them are zero, the default Z range in the CameraGroup is used.
! scope="col" | Value
; clustered-forward
! scope="col" | Default Value
: Enables the use of clustered forward rendering for this pass.
! scope="col" | Description
; 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.
! scope="row"| <tt>cull-mask</tt>
| {{Yes}}
| A 32 bit number. See <tt>simgear/scene/util/RenderConstants.hxx</tt> to know which bits enable what
| <tt>0xffffffff</tt>
| Specifies the cull mask to be used in the underlying <tt>osg::Camera</tt>
|-
! scope="row"| <tt>z-near, z-far</tt>
| {{Yes}}
| int
| Default Z range in the CameraGroup
| They change the depth range to be used
|-
! scope="row"| <tt>cubemap-face</tt>
| {{Yes}}
| int
| <tt>-1</tt> (don't use cubemap)
| 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 ====
==== 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.
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
{| class="wikitable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;
: Specifies the x, y, width and height of the fullscreen quad inside the viewport using normalized coordinates.
! scope="col" | Parameter Name
; effect
! scope="col" | Optional
: The quad will use this effect.
! scope="col" | Value
! scope="col" | Default Value
! scope="col" | Description
|-
! scope="row"| <tt>geometry</tt>
| {{Yes}}
| float values for <code><x>, <y>, <width>, <height></code>
| <tt>0.0, 0.0, 1.0, 1.0</tt> respectively
| Size of the fullscreen quad inside the viewport using normalized coordinates.
|-
! scope="row"| <tt>effect</tt>
| {{Yes}}
| Valid Effect file
| None
| This Effect will be applied to the quad geometry
|}


==== shadow-map ====
==== shadow-map ====
Renders the scene from a light's point of view.
Renders the scene from a light's point of view.
; light-num
{| class="wikitable" style="text-align: center; font-size: 85%; width: auto; table-layout: fixed;
: The OpenGL light number to use for this shadow map.
! scope="col" | Parameter Name
; near-m and far-m
! scope="col" | Optional
: They specify the range of the shadow map.
! scope="col" | Value
 
! scope="col" | Default Value
Example XML for a ''scene'' type pass:
! scope="col" | Description
 
|-
<syntaxhighlight lang="xml">
! scope="row"| <tt>light-name</tt>
<pass>
| {{No}}
  <name>forward-lighting</name>
| Valid light name that exists in the scene graph
  <type>scene</type>
|
  <clear-color type="vec4d">0 0 0 0</clear-color>
| The name of the osg::LightSource to use for this shadow map
 
|-
  <clustered-forward/>
! scope="row"| <tt>near-m, far-m</tt>
 
| {{No}}
  <binding>
| Valid Effect file
    <buffer>shadowmap</buffer>
|
    <unit>10</unit>
| They specify the depth range of the shadow map
  </binding>
|}
  <attachment>
    <buffer>color</buffer>
    <component>color0</component>
    <multisample-samples>4</multisample-samples>
    <multisample-color-samples>4</multisample-color-samples>
  </attachment>
  <attachment>
    <buffer>depth</buffer>
    <component>depth</component>
  </attachment>
</pass>
</syntaxhighlight>


== TODO ==
== TODO ==
342

edits