Effect framework: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 415: Line 415:


=Uniforms passed to shaders outside the xml effect framework=
=Uniforms passed to shaders outside the xml effect framework=
mat4 osg_ViewMatrixInverse


mat4 osg_ViewMatrix
{| class="wikitable"
 
!Name
vec2 fg_BufferSize
!Type
 
!Purpose
float osg_SimulationTime
|-
|<tt>fg_ViewMatrix</tt>
|<tt>mat4</tt>
|In fullscreen pass only, view matrix used to transform the screen position to view direction
|-
|<tt>fg_ViewMatrixInverse</tt>
|<tt>mat4</tt>
|In fullscreen pass only, view matrix inverse used to transform the screen position to view direction
|-
|<tt>fg_ProjectionMatrixInverse</tt>
|<tt>mat4</tt>
|In fullscreen pass only, projection matrix inverse used to transform the screen position to view direction
|-
|<tt>fg_CameraPositionCart</tt>
|<tt>vec3</tt>
|Position of the camera in world space, expressed in cartesian coordinates
|-
|<tt>fg_CameraPositionGeod</tt>
|<tt>vec3</tt>
|Position of the camera in world space, expressed in geodesic coordinates (longitude in radians, latitude in radians, elevation in meters)
|-
|<tt>fg_SunAmbientColor</tt>
|<tt>vec4</tt>
|
|-
|<tt>fg_SunDiffuseColor</tt>
|<tt>vec4</tt>
|
|-
|<tt>fg_SunSpecularColor</tt>
|<tt>vec4</tt>
|
|-
|<tt>fg_SunDirection</tt>
|<tt>vec3</tt>
|
|-
|<tt>fg_FogColor</tt>
|<tt>vec4</tt>
|
|-
|<tt>fg_FogDensity</tt>
|<tt>float</tt>
|
|-
|<tt>fg_ShadowNumber</tt>
|<tt>int</tt>
|
|-
|<tt>fg_ShadowDistances</tt>
|<tt>vec4</tt>
|
|-
|<tt>fg_DepthInColor</tt>
|<tt>bool</tt>
|Tells if the depth is stored in a depth texture or a color texture
|-
|<tt>fg_Planes</tt>
|<tt>vec3</tt>
|Used to convert the value of the depth buffer to a depth that can be used to compute the eye space position of the fragment
|-
|<tt>fg_BufferSize</tt>
|<tt>vec2</tt>
|Dimensions of the buffer, used to convert gl_FragCoord into the range [0..1][0..1]
|-
|<tt>osg_ViewMatrix</tt>
|<tt>mat4</tt>
|Defined by OSG, used only when working on actual geometry
|-
|<tt>osg_ViewMatrixInverse</tt>
|<tt>mat4</tt>
|Defined by OSG, used only when working on actual geometry
|-
|<tt>osg_SimulationTime</tt>
|<tt>float</tt>
|Defined by OSG
|}


[[Category:Shader development]]
[[Category:Shader development]]
574

edits

Navigation menu