SPostFX

Index

Functions Index

Function Name

Functions

CreateCommandBuffer

SCommandBuffer CreateCommandBuffer ()

Return a new CommandBuffer.

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)

AddCommandBufferToCamera

void AddCommandBufferToCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

Add the CommandBuffer to the Main Camera.

ParameterTypeDescription

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

RemoveCommandBufferFromCamera

void RemoveCommandBufferFromCamera (SCommandBuffer commandbuffer, int cameraEvent=19)

Remove the CommandBuffer from the Main Camera.

ParameterTypeDescription

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

SetPostProfile

void SetPostProfile (SResource customProfile)

Set a custom Space Post-Processing Profile.

ParameterTypeDescription

Space.PostFX.SetPostProfile(Space.Resources[1])

ClearPostProfile

void ClearPostProfile ()

Clear current Post-Processing profile and restore default one.

Space.PostFX.ClearPostProfile()

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

ParameterTypeDescription

Space.PostFX.SetCrepsecularRays(true, 255.0, 0.0, 0.0, 0.0,0.0, 255.0, 1.0, 1.0, 2, 4.0)

SetAmbientOcclusion

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

Function Description

ParameterTypeDescription

Space.PostFX.SetAmbientOcclusion(true, 4.0, true)

SetMotionBlur

void SetMotionBlur (bool on, float shutterAngle)

Function Description

ParameterTypeDescription

Space.PostFX.SetMotionBlur(true, 20.0)

SetBloom

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

Function Description

ParameterTypeDescription

Space.PostFX.SetBloom(true, 2.0, 4.0)

SetAnamorphicFlares

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

Function Description

ParameterTypeDescription

Space.PostFX.SetBloom(true, 255.0, 0.0, 0.0, 4.0, 2.0, 3.0, true)

SetVignette

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

Function Description

ParameterTypeDescription

Space.PostFX.SetVignette(true, 255.0, 0.0, 0.0, 4.0)

SetLensDirt

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

Function Description

ParameterTypeDescription

Space.PostFX.SetLensDirt(true, 4.0, Space.Resources[1], 4.0)

SetChromaticAberrationPost

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

Function Description

ParameterTypeDescription

Space.PostFX.SetChromaticAberrationPost(true, 4.0, 1.0)

SetFocus

void SetFocus (SGameObject target)

Function Description

ParameterTypeDescription

Space.PostFX.SetFocus(Space.Host.ExecutingObject)

SupressFocus

void SupressFocus ()

Function Description

Space.PostFX.SupressFocus()

RestoreFocus

void RestoreFocus ()

Function Description

Space.PostFX.RestoreFocus()

SetLookUpTable

void SetLookUpTable (SResource lut)

Function Description

ParameterTypeDescription

Space.PostFX.SetLookUpTable(Space.Resources[1])

Last updated

Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.