Skip to main content

Meta_ViewFilter

Module: Metanodes / Definitions

Meta_ViewFilter's are associated with Views, and correspond to a full-screen quad being drawn over the View executing a fragment shader function. More...

#include <meta_division.hpp>

Public Types

TypeName
enumBlendMode { BlendMode_None, BlendMode_Alpha, BlendMode_Add, BlendMode_Multiply }
Values for Idx_BlendMode.
enumIDX { Idx_Enabled, Idx_Shader, Idx_BlendMode }

Detailed Description

struct Meta_ViewFilter;

Meta_ViewFilter's are associated with Views, and correspond to a full-screen quad being drawn over the View executing a fragment shader function.

The shader can sample the current contents of the View's colour and depth buffers (among others) as it goes. Examples of filters: colour grading, depth-of-field, screen-space ambient occlusion, screen-space reflections, screen-space atmospheric scattering, night-vision goggles.

Expected Implementation Details:- When the Shader property changes (or when the SourceCode property of the linked Shader changes) any new arguments in the linked shader will be copied over to this ViewFilter as children, allowing the user to override the defaults in the Shader.

Public Types Documentation

enum BlendMode

EnumeratorValueDescription
BlendMode_NoneNo blend mode (Symbols - C: "BlendModeNone", Lua: __ViewFilter_BlendModeNone)
BlendMode_AlphaAlpha blending (Symbols - C: "BlendModeAlpha", Lua: __ViewFilter_BlendModeAlpha)
BlendMode_AddAdditive blending (Symbols - C: "BlendModeAdd", Lua: __ViewFilter_BlendModeAdd)
BlendMode_MultiplyMultiplicative blending (Symbols - C: "BlendModeMultiply", Lua: __ViewFilter_BlendModeMultiply)

Values for Idx_BlendMode.

enum IDX

EnumeratorValueDescription
Idx_Enabledbool - whether or not to apply the filter to any views it's attached to
Idx_Shaderlink - a link to a Meta_ViewShader instance
Idx_BlendModeBlendMode (int) - controls how shader output is blended with the framebuffer contents.