From 1555d850d7bf6932d0f15292de5ac6890c95bd13 Mon Sep 17 00:00:00 2001 From: RutvikTak <65209850+rutvik110@users.noreply.github.com> Date: Thu, 2 Jun 2022 12:01:44 +0530 Subject: [PATCH 1/4] Linked the rules to follow while writing GLSL This may be helpful to let the developers know what their GLSL code should/shouldn't contain so that the generated SPIR-V properly runs on dart SPIR-V Transpiler. PS : sorry for the earlier PR which I had to close due to some issues. --- docs/shader-specifications/1-shaders.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/shader-specifications/1-shaders.md b/docs/shader-specifications/1-shaders.md index b26b39e..70c5110 100644 --- a/docs/shader-specifications/1-shaders.md +++ b/docs/shader-specifications/1-shaders.md @@ -40,6 +40,9 @@ The result of this shader is this: ![simple_uv_map](https://raw.githubusercontent.com/wolfenrain/umbra/main/assets/simple_uv_map.png) +> **Note** +> **Adhere to the rules** mentioned [here](https://github.com/flutter/engine/blob/master/lib/spirv/README.md) while writing your GLSL code. Some of these rules are handled by Umbra while generating the raw GLSL code but for some, you need to be on the lookout. + ## Further Reading For a nice introduction on shaders check out [The Book Of Shaders](https://thebookofshaders.com/). From 1a8b6f836f6cc27c92d5ea44fd00033ff5a135af Mon Sep 17 00:00:00 2001 From: rutvik110 Date: Thu, 2 Jun 2022 17:29:08 +0530 Subject: [PATCH 2/4] updated shader specification doc --- docs/shader-specifications/1-shaders.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/shader-specifications/1-shaders.md b/docs/shader-specifications/1-shaders.md index b26b39e..853f7b1 100644 --- a/docs/shader-specifications/1-shaders.md +++ b/docs/shader-specifications/1-shaders.md @@ -14,6 +14,8 @@ parameters the shader need, in which order the data of those parameters should b to do anything related to assets. This makes it easier for users of the shader as they now have a strongly typed API that has parameters with which they are more familiar and it can be used immediately without any other configuration. +> **Note** +> **Adhere to the rules** mentioned in the [SPIR-V library](https://github.com/flutter/engine/blob/master/lib/spirv/README.md) while writing your GLSL code. Some of these rules are handled by Umbra while generating the raw GLSL code but for some, you need to be on the lookout. ## Umbra Shader Abstraction From 6b864d0392da801851d0cdfa800e68580d058b72 Mon Sep 17 00:00:00 2001 From: rutvik110 Date: Thu, 2 Jun 2022 17:53:40 +0530 Subject: [PATCH 3/4] removed duplicated doc content --- docs/shader-specifications/1-shaders.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/shader-specifications/1-shaders.md b/docs/shader-specifications/1-shaders.md index 6ae1ed8..853f7b1 100644 --- a/docs/shader-specifications/1-shaders.md +++ b/docs/shader-specifications/1-shaders.md @@ -42,9 +42,6 @@ The result of this shader is this: ![simple_uv_map](https://raw.githubusercontent.com/wolfenrain/umbra/main/assets/simple_uv_map.png) -> **Note** -> **Adhere to the rules** mentioned [here](https://github.com/flutter/engine/blob/master/lib/spirv/README.md) while writing your GLSL code. Some of these rules are handled by Umbra while generating the raw GLSL code but for some, you need to be on the lookout. - ## Further Reading For a nice introduction on shaders check out [The Book Of Shaders](https://thebookofshaders.com/). From e8058f75d57d3b9263049266dd3f531fab122167 Mon Sep 17 00:00:00 2001 From: RutvikTak <65209850+rutvik110@users.noreply.github.com> Date: Thu, 2 Jun 2022 18:33:49 +0530 Subject: [PATCH 4/4] Update docs/shader-specifications/1-shaders.md Yah, this is much better. Co-authored-by: Jochum van der Ploeg --- docs/shader-specifications/1-shaders.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/shader-specifications/1-shaders.md b/docs/shader-specifications/1-shaders.md index 853f7b1..56eebde 100644 --- a/docs/shader-specifications/1-shaders.md +++ b/docs/shader-specifications/1-shaders.md @@ -14,8 +14,7 @@ parameters the shader need, in which order the data of those parameters should b to do anything related to assets. This makes it easier for users of the shader as they now have a strongly typed API that has parameters with which they are more familiar and it can be used immediately without any other configuration. -> **Note** -> **Adhere to the rules** mentioned in the [SPIR-V library](https://github.com/flutter/engine/blob/master/lib/spirv/README.md) while writing your GLSL code. Some of these rules are handled by Umbra while generating the raw GLSL code but for some, you need to be on the lookout. +❗ Note: As mentioned above there are certain constraints from the [SPIR-V library](https://github.com/flutter/engine/blob/master/lib/spirv/README.md) that you have to adhere to while writing your GLSL code. Some of these rules are handled by Umbra while generating the raw GLSL code but it is still recommended to read up on the rules because Umbra is not able to cover them all. ## Umbra Shader Abstraction