Skip to content

Commit a089f2e

Browse files
authored
Spacing
1 parent 5f0f09a commit a089f2e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

docs/advanced.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ Pre-processing -> Parsing -> Preparing shaders -> Rendering
4646
This step is used for two main purposes:
4747
1. Shader opcode synchronization
4848
2. Source injection
49+
4950
**Shader opcode synchronization** is simply making sure that the opcodes we send to the interpreted shaders match the ones it internally stores. After all, if we send the expression `CONSTANT CONSTANT ADD` as `2u,2u, 6u`, and, internally, `6u` is the code for `MULT`, we are getting a wrong plot. This is prevented here, as the source code for all interpreter logic are written at runtime.
51+
5052
**Source injection** is also done at this step: all the base code is written to our 2D interpreted shader (`plotter.frag`), and all the shaders that require functions shared with `plotter.frag` copy these 'blocks' from it. After all, we might have issues where the same function being interpreted and compiled looks different, which is not something we can have.
5153

5254
We tell the preprocessor where these "blocks" are with the following syntax:

0 commit comments

Comments
 (0)