SPostFX
Dans cette classeCreateCommandBuffer
| Fonction | CreateCommandBuffer | Return a new CommandBuffer. |
| Fonction | AddCommandBufferToCamera | Add the CommandBuffer to the Main Camera. |
| Fonction | RemoveCommandBufferFromCamera | Remove the CommandBuffer from the Main Camera. |
| Fonction | SetPostProfile | Set a custom Space Post-Processing Profile. |
| Fonction | ClearPostProfile | Clear current Post-Processing profile and restore default one. |
| Fonction | SetCrepsecularRays | – |
| Fonction | SetAmbientOcclusion | – |
| Fonction | SetMotionBlur | – |
| Fonction | SetBloom | – |
| Fonction | SetAnamorphicFlares | – |
| Fonction | SetVignette | – |
| Fonction | SetLensDirt | – |
| Fonction | SetChromaticAberrationPost | – |
| Fonction | SetFocus | – |
| Fonction | SupressFocus | – |
| Fonction | RestoreFocus | – |
| Fonction | SetLookUpTable | – |
Fonctions
CreateCommandBuffer
Return a new CommandBuffer.
Valeurs de retour
SCommandBuffer
Exemple
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
Add the CommandBuffer to the Main Camera.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| commandbuffer | SCommandBuffer | – |
| cameraEvent | int | 19 |
Valeurs de retour
void
Exemple
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
Remove the CommandBuffer from the Main Camera.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| commandbuffer | SCommandBuffer | – |
| cameraEvent | int | 19 |
Valeurs de retour
void
Exemple
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
Set a custom Space Post-Processing Profile.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| customProfile | SResource | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetPostProfile(Space.Resources[1])
ClearPostProfile
Clear current Post-Processing profile and restore default one.
Valeurs de retour
void
Exemple
Space.PostFX.ClearPostProfile()
SetCrepsecularRays
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| thresR | float | – |
| thresG | float | – |
| thresB | float | – |
| colorR | float | – |
| colorG | float | – |
| colorB | float | – |
| falloff | float | – |
| blurSize | float | – |
| blurIterations | int | – |
| intensity | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetCrepsecularRays(true, 255.0, 0.0, 0.0, 0.0,0.0, 255.0, 1.0, 1.0, 2, 4.0)
SetAmbientOcclusion
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| intensity | float | – |
| aoOnly | bool | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetAmbientOcclusion(true, 4.0, true)
SetMotionBlur
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| shutterAngle | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetMotionBlur(true, 20.0)
SetBloom
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| threshold | float | – |
| intensity | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetBloom(true, 2.0, 4.0)
SetAnamorphicFlares
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| r | float | – |
| g | float | – |
| b | float | – |
| intensity | float | – |
| threshold | float | – |
| spread | float | – |
| vertical | bool | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetBloom(true, 255.0, 0.0, 0.0, 4.0, 2.0, 3.0, true)
SetVignette
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| r | float | – |
| g | float | – |
| b | float | – |
| intensity | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetVignette(true, 255.0, 0.0, 0.0, 4.0)
SetLensDirt
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| threshold | float | – |
| texture | SResource | – |
| intensity | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetLensDirt(true, 4.0, Space.Resources[1], 4.0)
SetChromaticAberrationPost
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| on | bool | – |
| strength | float | – |
| cornerBlur | float | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetChromaticAberrationPost(true, 4.0, 1.0)
SetFocus
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| target | SGameObject | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetFocus(Space.Host.ExecutingObject)
SupressFocus
Valeurs de retour
void
Exemple
Space.PostFX.SupressFocus()
RestoreFocus
Valeurs de retour
void
Exemple
Space.PostFX.RestoreFocus()
SetLookUpTable
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| lut | SResource | – |
Valeurs de retour
void
Exemple
Space.PostFX.SetLookUpTable(Space.Resources[1])



