From 802b8cd4a741db01da3a5af11b5022cbccf06a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Fri, 21 Aug 2015 00:20:18 +0200 Subject: [PATCH] Update Shaders.create.md --- docs/api/Shaders.create.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/api/Shaders.create.md b/docs/api/Shaders.create.md index b828469..7d18386 100644 --- a/docs/api/Shaders.create.md +++ b/docs/api/Shaders.create.md @@ -21,6 +21,12 @@ void main () { ``` +`GL.Shaders.create` is inspired from ReactNative's `StyleSheet.create`: it creates an object with key-value and will returns an object with the same keys and where the values can be used in the Virtual DOM. + +The value of each Shader is an object with a `frag` field: the fragment GLSL code. + +## About Shaders + There are two kinds of OpenGL Shaders: vertex and fragment shaders. The vertex shader iterates over polygons and computes pixel positions, the fragment shaders iterates over pixels and computes a color. @@ -30,6 +36,3 @@ and you only have to implement the fragment shader. > This documentation assumes you know the basics of GLSL, the OpenGL Shading Language, if not, feel free to learn [shader-school](https://www.npmjs.com/package/shader-school), read the [specification](https://www.opengl.org/documentation/glsl/) or learn from the examples. -`GL.Shaders.create` is inspired from ReactNative's `StyleSheet.create`: it creates an object with key-value and will returns an object with the same keys and where the values can be used in the Virtual DOM. - -The value of each Shader is an object with a `frag` field: the fragment GLSL code. -- 2.26.2