diff options
author | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-22 10:30:16 +1000 |
---|---|---|
committer | omnisci3nce <omniscient.oce@gmail.com> | 2024-07-22 10:30:16 +1000 |
commit | 5a4da588b628fe3b1e612a49374b55d7075fd141 (patch) | |
tree | 7fc2c4d8260e8a09462b1618656d2b13224e479a /docs | |
parent | aa57d6bc98d7bc369891f68af29c465b7c3333cb (diff) |
adding some info on binding in docs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/rendering.md | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/docs/rendering.md b/docs/rendering.md index 5b1dfe2..b7bc5f6 100644 --- a/docs/rendering.md +++ b/docs/rendering.md @@ -10,4 +10,20 @@ Rendering is split into 3 'registers'. ## RAL - RAL doesn't know what 'meshes' are or 'materials', it purely deals with buffers, textures, pipelines, etc. Those concepts - are left to the `Render` module.
\ No newline at end of file + are left to the `Render` module. + +## Render + +## Adding shader effects + +A few decisions have affected how shader data binding works in the RAL and if you're coming from purely OpenGL with floating uniforms like + +```glsl +uniform mat4 viewProjection; +``` +it might feel a little complicated. However, this setup helps us abstract over different graphics API backends as well as be more performant in the general case +with more data uploaded in one call. +Because of the lack of generics in C, we adopt a `void*` data with a function pointer returning a "layout" for bindings that the backend can then interpret in order +to know how to bind that specific data. This means you will need to do a little bit of work creating a function for each shader data binding. We'll look at an example: + +**TODO: ShaderBinding / Layout example**
\ No newline at end of file |