Documentation
¶
Overview ¶
This resource defines a custom rendering effect that can be applied to [graphics.gd/classdb/Viewport]s through the viewports' graphics.gd/classdb/Environment. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. CompositorEffect is an abstract base class and must be extended to implement specific rendering logic.
Index ¶
- type Advanced
- type Any
- type EffectCallbackType
- type Extension
- type ID
- type Implementation
- type Instance
- func (self Instance) AccessResolvedColor() bool
- func (self Instance) AccessResolvedDepth() bool
- func (self Instance) AsCompositorEffect() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) EffectCallbackType() EffectCallbackType
- func (self Instance) Enabled() bool
- func (self Instance) ID() ID
- func (self Instance) NeedsMotionVectors() bool
- func (self Instance) NeedsNormalRoughness() bool
- func (self Instance) NeedsSeparateSpecular() bool
- func (self Instance) SetAccessResolvedColor(value bool)
- func (self Instance) SetAccessResolvedDepth(value bool)
- func (self Instance) SetEffectCallbackType(value EffectCallbackType)
- func (self Instance) SetEnabled(value bool)
- func (self Instance) SetNeedsMotionVectors(value bool)
- func (self Instance) SetNeedsNormalRoughness(value bool)
- func (self Instance) SetNeedsSeparateSpecular(value bool)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type EffectCallbackType ¶
type EffectCallbackType int //gd:CompositorEffect.EffectCallbackType
const ( // The callback is called before our opaque rendering pass, but after depth prepass (if applicable). EffectCallbackTypePreOpaque EffectCallbackType = 0 // The callback is called after our opaque rendering pass, but before our sky is rendered. EffectCallbackTypePostOpaque EffectCallbackType = 1 // The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). EffectCallbackTypePostSky EffectCallbackType = 2 // The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. EffectCallbackTypePreTransparent EffectCallbackType = 3 // The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target. EffectCallbackTypePostTransparent EffectCallbackType = 4 // Represents the size of the [EffectCallbackType] enum. EffectCallbackTypeMax EffectCallbackType = 5 )
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this [Extension]See Interface for methods that can be overridden by T.
func (*Extension[T]) AsCompositorEffect ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Implementation ¶
type Implementation = implementation
Implementation implements Interface with empty methods.
type Instance ¶
type Instance [1]gdclass.CompositorEffect
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AccessResolvedColor ¶
func (Instance) AccessResolvedDepth ¶
func (Instance) AsCompositorEffect ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) EffectCallbackType ¶
func (self Instance) EffectCallbackType() EffectCallbackType
func (Instance) NeedsMotionVectors ¶
func (Instance) NeedsNormalRoughness ¶
func (Instance) NeedsSeparateSpecular ¶
func (Instance) SetAccessResolvedColor ¶
func (Instance) SetAccessResolvedDepth ¶
func (Instance) SetEffectCallbackType ¶
func (self Instance) SetEffectCallbackType(value EffectCallbackType)
func (Instance) SetEnabled ¶
func (Instance) SetNeedsMotionVectors ¶
func (Instance) SetNeedsNormalRoughness ¶
func (Instance) SetNeedsSeparateSpecular ¶
type Interface ¶
type Interface interface { // Implement this function with your custom rendering code. 'effect_callback_type' should always match the effect callback type you've specified in [Instance.EffectCallbackType]. 'render_data' provides access to the rendering state, it is only valid during rendering and should not be stored. RenderCallback(effect_callback_type int, render_data RenderData.Instance) }