Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/doc/lua/openstarbound/renderer.md
blob: 567808536e725c978af12df374b43bb8e1be4b5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

# Renderer

The new renderer table is accessible from almost every clientside script and allows configuring shaders.

---

#### `void` renderer.setPostProcessGroupEnabled(String group, bool enabled, [bool save])

Enables or disables a post process shader group. If save is true, this change is saved to configuration as well.

---

#### `bool` renderer.postProcessGroupEnabled(String group)

Returns true if the specified post process group is enabled.

---

#### `Json` renderer.postProcessGroups()

Returns every post process group. Identical to grabbing them from client.config with root.assetJson.

---

#### `Json` renderer.setEffectParameter(String effectName, String parameterName, RenderEffectParameter value)

Sets the specified scriptable parameter of the specified shader effect to the provided value. 
This is accessed from the shader as a uniform and must be defined in the effect's configuration.

---

#### `RenderEffectParameter` renderer.getEffectParameter(String effectName, String parameterName)

Returns the specified scriptable parameter of the specified shader effect.

---