Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

Effect Framework

1,767 bytes added, 1 September
Uniforms passed to shaders outside the xml effect framework
=Uniforms passed to shaders outside the xml effect framework=
mat4 osg_ViewMatrixInverse
{| class="wikitable"!Name!Type!Purpose|-|<tt>fg_ViewMatrix</tt>|<tt>mat4 osg_ViewMatrix</tt>|In fullscreen pass only, view matrix used to transform the screen position to view directionvec2 fg_BufferSize|-|<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]]
493
edits

Navigation menu