|
|
(9 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | The Render Settings include values for a range of visual elements in Scene, such as fog and ambient light.
| + | This page has moved to: https://docs.sine.space/v/scripting/client-scripting/scene/srendersettings |
− | | + | |
− | =Members=
| + | |
− | | + | |
− | {{ScriptFunction|void|SetGlobalShaderTexture|{string name, SResource dir;}|Set a global texture property.|
| + | |
− | ''--Create a shader first and define it "half _Mult".''<br>
| + | |
− | ''--Use "_Mult" as "_Metallic" and delete "_Metallic".''<br>
| + | |
− | ''--set value and put on a gameobject''<br>
| + | |
− | Space.RenderSettings.SetGlobalShaderTexture("_TestTex",Space.Resources[3])
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|SetGlobalShaderFloat|{string name, float dir;}|Set a global float property for all shaders.|
| + | |
− | ''--Create a shader first and define "sampler2D _TestTex".''<br>
| + | |
− | ''--Use "_TestTex" as "_MainTex" and delete "_MainTex".''<br>
| + | |
− | ''--set value and put on a gameobject''<br>
| + | |
− | Space.RenderSettings.SetGlobalShaderFloat("_Mult",1)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|SetGlobalShaderColor|{string name, SColor dir;}|Set a global color property for all shaders.|
| + | |
− | ''--create a shader first and define "fixed4 _TestColor"''<br>
| + | |
− | ''--use "_TestColor" as "_Color" and delete "_TestColor".''<br>
| + | |
− | ''--set value and put on a gameobject''<br>
| + | |
− | Space.RenderSettings.SetGlobalShaderFloat("_TestColor",Color.Red)
| + | |
− | }}
| + | |
− | | + | |
− | {{ScriptFunction|void|SetGlobalShaderVector|{string name, SVector dir;}|Set a global color property for all shaders.|''--Create a shader first and define "vector _TestVector"''<br>
| + | |
− | ''--set value and put on a gameobject''<br>
| + | |
− | Space.RenderSettings.SetGlobalShaderFloat("_TestVector",Vector.One)
| + | |
− | }}
| + | |
− | | + | |
− | | + | |
− | =Properties=
| + | |