Effect framework: Difference between revisions

Jump to navigation Jump to search
(→‎program: Added link to shader page)
(One intermediate revision by the same user not shown)
Line 340: Line 340:
Example:
Example:
<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
                 <texture-unit>
                 <blend>
                         <active>true</active>
                         <active>true</active>
                         <source>one-minus-dst-alpha</source>
                         <source>one-minus-dst-alpha</source>
<destination>src-alpha-saturate</destination>
<destination>src-alpha-saturate</destination>
</texture-unit>
</blend>
</syntaxhighlight>
</syntaxhighlight>


Line 463: Line 463:
|<tt>fg_ViewMatrix</tt>
|<tt>fg_ViewMatrix</tt>
|<tt>mat4</tt>
|<tt>mat4</tt>
|In fullscreen pass only, view matrix used to transform the screen position to view direction
|In fullscreen pass only, view matrix used to transform from world to view space. Same as osg_ViewMatrix, but for fullscreen pass.
|-
|-
|<tt>fg_ViewMatrixInverse</tt>
|<tt>fg_ViewMatrixInverse</tt>
|<tt>mat4</tt>
|<tt>mat4</tt>
|In fullscreen pass only, view matrix inverse used to transform the screen position to view direction
|In fullscreen pass only, view matrix inverse used to transform from view to world space. Same as osg_ViewMatrixInverse but for fullscreen pass.
|-
|-
|<tt>fg_ProjectionMatrixInverse</tt>
|<tt>fg_ProjectionMatrixInverse</tt>
|<tt>mat4</tt>
|<tt>mat4</tt>
|In fullscreen pass only, projection matrix inverse used to transform the screen position to view direction
|In fullscreen pass only, projection matrix inverse
|-
|-
|<tt>fg_CameraPositionCart</tt>
|<tt>fg_CameraPositionCart</tt>
Line 483: Line 483:
|<tt>fg_SunAmbientColor</tt>
|<tt>fg_SunAmbientColor</tt>
|<tt>vec4</tt>
|<tt>vec4</tt>
|
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.
|-
|-
|<tt>fg_SunDiffuseColor</tt>
|<tt>fg_SunDiffuseColor</tt>
|<tt>vec4</tt>
|<tt>vec4</tt>
|
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.
|-
|-
|<tt>fg_SunSpecularColor</tt>
|<tt>fg_SunSpecularColor</tt>
|<tt>vec4</tt>
|<tt>vec4</tt>
|
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.
|-
|-
|<tt>fg_SunDirection</tt>
|<tt>fg_SunDirection</tt>
|<tt>vec3</tt>
|<tt>vec3</tt>
|
|For fullscreen pass only, sun information as lightsource[0] is not available in fullscreen pass.
|-
|-
|<tt>fg_FogColor</tt>
|<tt>fg_FogColor</tt>
Line 527: Line 527:
|<tt>osg_ViewMatrix</tt>
|<tt>osg_ViewMatrix</tt>
|<tt>mat4</tt>
|<tt>mat4</tt>
|Defined by OSG, used only when working on actual geometry
|Defined by OSG, used only when working on actual geometry. Transforms from world to view space.
|-
|-
|<tt>osg_ViewMatrixInverse</tt>
|<tt>osg_ViewMatrixInverse</tt>
|<tt>mat4</tt>
|<tt>mat4</tt>
|Defined by OSG, used only when working on actual geometry
|Defined by OSG, used only when working on actual geometry. Transforms from view to world space.
|-
|-
|<tt>osg_SimulationTime</tt>
|<tt>osg_SimulationTime</tt>
574

edits

Navigation menu