All pages
Powered by GitBook
1 of 1

Loading...

SPostFX

Index

Functions Index

Function Name

Functions

CreateCommandBuffer

CreateCommandBuffer ()

Return a new CommandBuffer.

AddCommandBufferToCamera

void AddCommandBufferToCamera ( commandbuffer, int cameraEvent=19)

Add the CommandBuffer to the Main Camera.

Parameter
Type
Description

RemoveCommandBufferFromCamera

void RemoveCommandBufferFromCamera ( commandbuffer, int cameraEvent=19)

Remove the CommandBuffer from the Main Camera.

Parameter
Type
Description

SetPostProfile

void SetPostProfile ( customProfile)

Set a custom Space Post-Processing Profile.

Parameter
Type
Description

ClearPostProfile

void ClearPostProfile ()

Clear current Post-Processing profile and restore default one.

SetCrepsecularRays

void SetCrepsecularRays (bool on, float thresR, float thresG, float thresB, float colorR, float colorG, float colorB, float falloff, float blurSize, int blurIterations, float intensity)

Function Description

Parameter
Type
Description

SetAmbientOcclusion

void SetAmbientOcclusion (bool on, float intensity, bool aoOnly)

Function Description

Parameter
Type
Description

SetMotionBlur

void SetMotionBlur (bool on, float shutterAngle)

Function Description

Parameter
Type
Description

SetBloom

void SetBloom (bool on, float threshold, float intensity)

Function Description

Parameter
Type
Description

SetAnamorphicFlares

void SetAnamorphicFlares (bool on, float r, float g, float b, float intensity, float threshold, float spread, bool vertical)

Function Description

Parameter
Type
Description

SetVignette

void SetVignette (bool on, float r, float g, float b, float intensity)

Function Description

Parameter
Type
Description

SetLensDirt

void SetLensDirt (bool on, float threshold, SResource texture, float intensity)

Function Description

Parameter
Type
Description

SetChromaticAberrationPost

void SetChromaticAberrationPost (bool on, float strength, float cornerBlur)

Function Description

Parameter
Type
Description

SetFocus

void SetFocus ( target)

Function Description

Parameter
Type
Description

SupressFocus

void SupressFocus ()

Function Description

RestoreFocus

void RestoreFocus ()

Function Description

SetLookUpTable

void SetLookUpTable ( lut)

Function Description

Parameter
Type
Description

void (bool on, float strength, float cornerBlur)

void (SGameObject target)

void ()

void ()

void (SResource lut)

SCommandBuffer CreateCommandBuffer ()

void AddCommandBufferToCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

void RemoveCommandBufferFromCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

void SetPostProfile (SResource customProfile)

void ClearPostProfile ()

void SetCrepsecularRays (bool on, float thresR, float thresG, float thresB, float colorR, float colorG, float colorB, float falloff, float blurSize, int blurIterations, float intensity)

void SetAmbientOcclusion (bool on, float intensity, bool aoOnly)

void SetMotionBlur (bool on, float shutterAngle)

void SetBloom (bool on, float threshold, float intensity)

void SetAnamorphicFlares (bool on, float r, float g, float b, float intensity, float threshold, float spread, bool vertical)

void SetVignette (bool on, float r, float g, float b, float intensity)

SCommandBuffer
SCommandBuffer
SCommandBuffer
SResource
SGameObject
SResource

void (bool on, float threshold, SResource texture, float intensity)

commandBuffer = Space.PostFX.CreateCommandBuffer()
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
Space.PostFX.AddCommandBufferToCamera(ACommandBuffer)
---or
Space.PostFX.AddCommandBufferToCamera(ACommandBuffer, 18)
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
function RemoveCommandBuffer()
--Bind this function to a button and then click it in playing.
    Space.PostFX.RemoveCommandBufferFromCamera(commandbuffer)
end
Space.PostFX.RemoveCommandBufferToCamera(ACommandBuffer)
---or
Space.PostFX.RemoveCommandBufferToCamera(ACommandBuffer, 18)
local commandbuffer=Space.PostFX.CreateCommandBuffer()
local mat=Space.Resources[1]
local cube=Space.Host.GetReference("Cube")
commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)
Space.PostFX.AddCommandBufferToCamera(commandbuffer)
function RemoveCommandBuffer()
--Bind this function to a button and then click it in playing.
    Space.PostFX.RemoveCommandBufferFromCamera(commandbuffer)
end
Space.PostFX.SetPostProfile(Space.Resources[1])
Space.PostFX.ClearPostProfile()
Space.PostFX.SetCrepsecularRays(true, 255.0, 0.0, 0.0, 0.0,0.0, 255.0, 1.0, 1.0, 2, 4.0)
Space.PostFX.SetAmbientOcclusion(true, 4.0, true)
Space.PostFX.SetMotionBlur(true, 20.0)
Space.PostFX.SetBloom(true, 2.0, 4.0)
Space.PostFX.SetBloom(true, 255.0, 0.0, 0.0, 4.0, 2.0, 3.0, true)
Space.PostFX.SetVignette(true, 255.0, 0.0, 0.0, 4.0)
Space.PostFX.SetLensDirt(true, 4.0, Space.Resources[1], 4.0)
Space.PostFX.SetChromaticAberrationPost(true, 4.0, 1.0)
Space.PostFX.SetFocus(Space.Host.ExecutingObject)
Space.PostFX.SupressFocus()
Space.PostFX.RestoreFocus()
Space.PostFX.SetLookUpTable(Space.Resources[1])
SetLensDirt
SetChromaticAberrationPost
SetFocus
SupressFocus
RestoreFocus
SetLookUpTable