Meta_ViewShader

A ViewShader represents a shader object, expected to be used by a Meta_ViewFilter.

The inputs to the shader will be set by this nodes children, each of which are expected to be one of the Meta_ShaderABC metanodes (e.g. Meta_ShaderVec3f, Meta_ShaderSampler etc.).

Expected Implementation Details:-

When the SourceCode property changes a search for "#pragma rex Meta_ViewShader with their defined default values, allowing the user to easily configure the shader from the property panel or a script. If these #pragma's are missing in the source the user will have to manually create the child Meta_MaterialParameter nodes and set their values.

Public Types


enum IDX

Property Index.

Idx_SourceCode

string - the source code of the shader. Usually a full GLSL shader but could be just a GLSL function used by a bigger shader.

Idx_Description

string - friendly description of what the shader does, for presenting to the user.

Idx_Target

Target (int)- determines when the shader runs and which buffers it has access to.

Idx_StereoMode

StereoMode (int) - specifies whether the shader applies to mono or stereo views, or both.


Values for Idx_StereoMode.

StereoMode_Any

The filter is applied regardless of whether stereo is enabled. (Symbols - C: "StereoModeAny", Lua: __ViewShader_StereoModeAny)

StereoMode_MonoOnly

The filter is applied only when rendering in mono. (Symbols - C: "StereoModeMonoOnly", Lua: __ViewShader_StereoModeMonoOnly)

StereoMode_StereoOnly

The filter is applied only when rendering in stereo. (Symbols - C: "StereoModeStereoOnly", Lua: __ViewShader_StereoModeStereoOnly)


enum Target

Values for Idx_Target.

Target_Viewport

The filter is applied to each viewport immediately after it is drawn, and can use all buffers. (Symbols - C: "TargetViewport", Lua: __ViewShader_TargetViewport)

Target_ViewportAfterHDR

The filter is applied to each viewport after the HDR pass (Symbols - C: "TargetViewportAfterHDR", Lua: __ViewShader_TargetViewportAfterHDR)

Target_Window

The filter is applied to the entire window after everything including the GUI is drawn, but can use only the colour buffer. (Symbols - C: "TargetWindow", Lua: __ViewShader_TargetWindow)

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtree_cppCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API