Skip to content

Commit c59d9f9

Browse files
committed
updated docs
1 parent 36e8486 commit c59d9f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ s0.clear()
135135
```
136136

137137

138-
#### Non-global mode
138+
#### Non-global mode [in progress]
139139
If makeGlobal is set to false, buffers and functions can be accessed via the hydra instance. Note that sources and buffers are contained in an array and accessed by index. E.g.:
140140
```
141141
hydra.s[0].initCam()
@@ -149,6 +149,13 @@ hydra.tick(dt)
149149
```
150150
where dt is the time elapsed in milliseconds since the last update
151151

152+
### Directly using shader code
153+
You can get access to the hydra shader code without rendering using hydra. For example,
154+
```
155+
osc().rotate().glsl()
156+
```
157+
returns a fragment shader string and list of uniforms. For vertex shader and attribute implentation, see https://github.com/ojack/hydra-synth/blob/master/src/output.js.
158+
152159
#### Adding/editing transformation functions
153160

154161
All of the available functions for transforming coordinates and color, as well as compositing textures, correspond directly to a snippet of fragment shader code. These transformations are defined in the file hydra/hydra-server/app/src/composable-glsl-transforms.js. When running locally, you can edit this file to change the available functions, and refresh the page to see changes.

0 commit comments

Comments
 (0)