SRenderSettings
Dans cette classeSetGlobalShaderTexture
- Fonctions
- Set
Global Shader Texture - Set
Global Shader Float - Set
Global Shader Color - Set
Global Shader Vector - Propriétés
- Default
Reflection Resolution - Skybox
- Flare
Fade Speed - Flare
Strength - Halo
Strength - Reflection
Bounces - Reflection
Intensity - Subtractive
Shadow Color - Ambient
Intensity - Ambient
Light - Ambient
Ground Color - Ambient
Equator Color - Ambient
Sky Color - Ambient
Mode - Fog
End Distance - Fog
Start Distance - Fog
Density - Fog
Color - Fog
Mode - Fog
- Ambient
Skybox Amount - Default
Reflection Mode
| Fonction | SetGlobalShaderTexture | Set a global texture property. |
| Fonction | SetGlobalShaderFloat | Set a global float property for all shaders. |
| Fonction | SetGlobalShaderColor | Set a global color property for all shaders. |
| Fonction | SetGlobalShaderVector | Set a global color property for all shaders. |
| Propriété | DefaultReflectionResolution | Cubemap resolution for default reflection. |
| Propriété | Skybox | The global skybox to use. |
| Propriété | FlareFadeSpeed | The fade speed of all flares in the Scene. |
| Propriété | FlareStrength | The intensity of all flares in the Scene. |
| Propriété | HaloStrength | Size of the light halos. |
| Propriété | ReflectionBounces | The number of times a reflection includes other reflections. |
| Propriété | ReflectionIntensity | How much the skybox / custom cubemap reflection affects the Scene. |
| Propriété | SubtractiveShadowColor | The color used for the sun shadows in the Subtractive lightmode. |
| Propriété | AmbientIntensity | How much the light from the Ambient Source affects the Scene. |
| Propriété | AmbientLight | Flat ambient lighting color. |
| Propriété | AmbientGroundColor | Ambient lighting coming from below. |
| Propriété | AmbientEquatorColor | Ambient lighting coming from the sides. |
| Propriété | AmbientSkyColor | Ambient lighting coming from above. |
| Propriété | AmbientMode | Ambient lighting mode. |
| Propriété | FogEndDistance | The ending distance of linear fog. |
| Propriété | FogStartDistance | The starting distance of linear fog. |
| Propriété | FogDensity | The density of the exponential fog. |
| Propriété | FogColor | The color of the fog. |
| Propriété | FogMode | Ambient lighting mode. |
| Propriété | Fog | Whether Fog is enabled |
| Propriété | AmbientSkyboxAmount | How much the light from the Ambient Source affects the Scene. |
| Propriété | DefaultReflectionMode | Ambient lighting mode. |
Fonctions
SetGlobalShaderTexture
Set a global texture property.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| name | string | – |
| dir | SResource | – |
Valeurs de retour
void
Exemple
Space.RenderSettings.SetGlobalShaderTexture("_TestTex",Space.Resources[1])
SetGlobalShaderFloat
Set a global float property for all shaders.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| name | string | – |
| dir | float | – |
Valeurs de retour
void
Exemple
Space.RenderSettings.SetGlobalShaderFloat("_Mult",1)
SetGlobalShaderColor
Set a global color property for all shaders.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| name | string | – |
| dir | SColor | – |
Valeurs de retour
void
Exemple
Space.RenderSettings.SetGlobalShaderFloat("_TestColor",Color.Red)
SetGlobalShaderVector
Set a global color property for all shaders.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| name | string | – |
| dir | SVector | – |
Valeurs de retour
void
Exemple
Space.RenderSettings.SetGlobalShaderFloat("_TestVector",Vector.One)
Propriétés
DefaultReflectionResolution
Cubemap resolution for default reflection.
Exemple
Space.RenderSettings.DefaultReflectionResolution=256
--the below script will make a slider change the Render Setting's Cube Map Resolution
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.DefaultReflectionResolution = slider.Value * 4096 -- from 0 to 40906
end
slider.OnValueChanged(OVC)
Skybox
The global skybox to use.
Exemple
Space.RenderSettings.Skybox=Space.Resources[1].AsMaterial
--clicking this object will toggle between two Skyboxes
--[Add 2 materials to the first two Resource slots in Scripting Runtime component]
thisGameObject = Space.Host.ExecutingObject
OnClick = function()
if Space.RenderSettings.Skybox==Space.Resources[1].AsMaterial then
Space.RenderSettings.Skybox=Space.Resources[2].AsMaterial
else
Space.RenderSettings.Skybox=Space.Resources[1].AsMaterial
end
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
FlareFadeSpeed
The fade speed of all flares in the Scene.
Exemple
Space.RenderSettings.FlareFadeSpeed=5
--the below script will make a slider change the Render Setting's Flare Fade Speed
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.FlareFadeSpeed = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
FlareStrength
The intensity of all flares in the Scene.
Exemple
Space.RenderSettings.FlareStrength=1
--the below script will make a slider change the Render Setting's Flare Strength
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.FlareStrength = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
HaloStrength
Size of the light halos.
Exemple
Space.RenderSettings.HaloStrength=1
--the below script will make a slider change the Render Setting's Halo Strength
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.HaloStrength = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
ReflectionBounces
The number of times a reflection includes other reflections.
Exemple
Space.RenderSettings.ReflectionBounces=5
--the below script will make a slider change the Render Setting's Reflection Bounces
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.ReflectionBounces = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
ReflectionIntensity
How much the skybox / custom cubemap reflection affects the Scene.
Exemple
Space.RenderSettings.ReflectionIntensity=1
--the below script will make a slider change the Render Setting's Reflection Intensity
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.ReflectionIntensity = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
SubtractiveShadowColor
The color used for the sun shadows in the Subtractive lightmode.
Exemple
Space.RenderSettings.SubtractiveShadowColor=Color.Red
--clicking the object will open a color picker that changes the Subtractive Shadow Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.SubtractiveShadowColor
OnChange = function(SColor)
Space.RenderSettings.SubtractiveShadowColor = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.SubtractiveShadowColor = SColor
end
OnCancel = function()
Space.RenderSettings.SubtractiveShadowColor = originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientIntensity
How much the light from the Ambient Source affects the Scene.
Exemple
Space.RenderSettings.AmbientIntensity = 1
--the below script will make a slider change the Render Setting's Ambient Intensity
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.AmbientIntensity = slider.Value * 5 -- from 0 to 5
end
slider.OnValueChanged(OVC)
AmbientLight
Flat ambient lighting color.
Exemple
Space.RenderSettings.AmbientLight=Color.Blue
--clicking the object will open a color picker that changes the Ambient Light Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientLight
OnChange = function(SColor)
Space.RenderSettings.AmbientLight = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.AmbientLight = SColor
end
OnCancel = function()
Space.RenderSettings.AmbientLight = originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientGroundColor
Ambient lighting coming from below.
Exemple
Space.RenderSettings.AmbientGroundColor=Color.Green
--clicking the object will open a color picker that changes the Ambient Ground Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientGroundColor
OnChange = function(SColor)
Space.RenderSettings.AmbientGroundColor = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.AmbientGroundColor = SColor
end
OnCancel = function()
Space.RenderSettings.AmbientGroundColor = originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientEquatorColor
Ambient lighting coming from the sides.
Exemple
Space.RenderSettings.AmbientEquatorColor=Color.Green
--clicking the object will open a color picker that changes the Ambient Equator Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientEquatorColor
OnChange = function(SColor)
Space.RenderSettings.AmbientEquatorColor = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.AmbientEquatorColor = SColor
end
OnCancel = function()
Space.RenderSettings.AmbientEquatorColor= originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientSkyColor
Ambient lighting coming from above.
Exemple
Space.RenderSettings.AmbientSkyColor=Color.White
--clicking the object will open a color picker that changes the Ambient Sky Color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.AmbientSkyColor
OnChange = function(SColor)
Space.RenderSettings.AmbientSkyColor = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.AmbientSkyColor = SColor
end
OnCancel = function()
Space.RenderSettings.AmbientSkyColor = originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientMode
Ambient lighting mode. Skybox = 1. Trilight = 2. Flat = 3. Custom = 4.
Exemple
Space.RenderSettings.AmbientMode=1
--clicking this object will toggle between 4 Ambient Modes
thisGameObject = Space.Host.ExecutingObject
OnClick = function()
if Space.RenderSettings.AmbientMode==4 then
Space.RenderSettings.AmbientMode=1
else
Space.RenderSettings.AmbientMode = Space.RenderSettings.AmbientMode + 1
end
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
FogEndDistance
The ending distance of linear fog.
Exemple
Space.RenderSettings.FogEndDistance=300
--the below script will make a slider change the Render Setting's Fog End Distance
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.FogEndDistance = (slider.Value * 170) + 30-- from 30 to 200
end
slider.OnValueChanged(OVC)
FogStartDistance
The starting distance of linear fog.
Exemple
Space.RenderSettings.FogStartDistance=10
--the below script will make a slider change the Render Setting's Fog Start Distance
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.FogStartDistance = (slider.Value * 10) -- from 0 to 10
end
slider.OnValueChanged(OVC)
FogDensity
The density of the exponential fog.
Exemple
Space.RenderSettings.FogDensity=10
--the below script will make a slider change the Render Setting's Fog Density
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.FogDensity = (slider.Value * 10) -- from 0 to 10
end
slider.OnValueChanged(OVC)
FogColor
The color of the fog.
Exemple
Space.RenderSettings.FogColor = Color.Red
--clicking the object will open a color picker that changes the Fog color
thisGameObject = Space.Host.ExecutingObject
originalColor = Space.RenderSettings.FogColor
OnChange = function(SColor)
Space.RenderSettings.FogColor = SColor
end
OnSelect = function(SColor)
Space.RenderSettings.FogColor = SColor
end
OnCancel = function()
Space.RenderSettings.FogColor = originalColor
end
OnClick = function()
Space.Dialogues.ColorPicker("title","okbutton", OnChange, OnSelect, OnCancel, originalColor)
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
FogMode
Ambient lighting mode. Linear = 1. Exponential = 2. ExponentialSquared = 3.
Exemple
Space.RenderSettings.FogMode=2
--clicking this object will toggle between 3 Fog Modes
thisGameObject = Space.Host.ExecutingObject
OnClick = function()
if Space.RenderSettings.FogMode==3 then
Space.RenderSettings.FogMode=1
else
Space.RenderSettings.FogMode = Space.RenderSettings.FogMode + 1
end
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
Fog
Whether Fog is enabled
Exemple
Space.RenderSettings.Fog=true
--clicking this object will toggle enable/disable Fog
thisGameObject = Space.Host.ExecutingObject
OnClick = function()
Space.RenderSettings.Fog = not Space.RenderSettings.Fog
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)
AmbientSkyboxAmount
How much the light from the Ambient Source affects the Scene.
Exemple
Space.RenderSettings.AmbientSkyboxAmount=10
--the below script will make a slider change the Render Setting's Ambient Skybox Amount
thisGameObject = Space.Host.ExecutingObject
slider = Space.Host.GetReference("slider").UISlider --add reference to Scripting Runtime
OVC = function()
Space.RenderSettings.AmbientSkyboxAmount = (slider.Value * 10) -- from 0 to 10
end
slider.OnValueChanged(OVC)
DefaultReflectionMode
Ambient lighting mode. Skybox = 0. Custom = 1.
Exemple
Space.RenderSettings.DefaultReflectionMode = 1
--clicking this object will toggle between two Default Reflection Modes
thisGameObject = Space.Host.ExecutingObject
OnClick = function()
if Space.RenderSettings.DefaultReflectionMode==1 then
Space.RenderSettings.DefaultReflectionMode=0
else
Space.RenderSettings.DefaultReflectionMode=1
end
end
thisGameObject.AddClickable()
thisGameObject.Clickable.OnClick(OnClick)



