|
|
Line 1: |
Line 1: |
− | =Members=
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/scene/spostfx |
− | {{ScriptFunction|SCommandBuffer|CreateCommandBuffer|{float r, float g, float b, float a}|Return a new CommandBuffer.|5=
| + | |
− | local commandbuffer=Space.PostFX.CreateCommandBuffer()<br>
| + | |
− | local mat=Space.Resources[1]<br>
| + | |
− | local cube=Space.Host.GetReference("Cube")<br>
| + | |
− | commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)<br>
| + | |
− | Space.PostFX.AddCommandBufferToCamera(commandbuffer)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|AddCommandBufferToCamera|(SCommandBuffer commandbuffer);|Add the CommandBuffer to the Main Camera.|5=
| + | |
− | ''--See CreateCommandBuffer''
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|RemoveCommandBufferFromCamera|(SCommandBuffer commandbuffer);|Remove the CommandBuffer from the Main Camera.|5=
| + | |
− | local commandbuffer=Space.PostFX.CreateCommandBuffer()<br>
| + | |
− | local mat=Space.Resources[1]<br>
| + | |
− | local cube=Space.Host.GetReference("Cube")<br>
| + | |
− | commandbuffer.DrawRenderer(cube.Renderer,mat.AsMaterial)<br>
| + | |
− | Space.PostFX.AddCommandBufferToCamera(commandbuffer)<br>
| + | |
− | function RemoveCommandBuffer()<br>
| + | |
− | ''--Bind this function to a button and then click it in playing.''<br>
| + | |
− | Space.PostFX.RemoveCommandBufferFromCamera(commandbuffer)<br>
| + | |
− | end
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|SetPostProfile|(SResource customProfile);|Set a custom Space Post-Processing Profile.|5=
| + | |
− | local file=Space.Resources[2]<br>
| + | |
− | ''--Create a Legacy/Space Post-processing profile.''<br>
| + | |
− | Space.PostFX.SetPostProfile(file)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|ClearPostProfile|();|Clear current Post-Processing profile and restore default one.|5=
| + | |
− | local file=Space.Resources[2]<br>
| + | |
− | ''--Create a Legacy/Space Post-processing profile.''<br>
| + | |
− | Space.PostFX.SetPostProfile(file)
| + | |
− | Space.PostFX.ClearPostProfile()
| + | |
− | }}
| + | |
− | | + | |
− | {{Scripting Navbox}}
| + | |