diff --git a/tutorial_shader_materials.md b/tutorial_shader_materials.md index b7240e1..43d2bfb 100644 --- a/tutorial_shader_materials.md +++ b/tutorial_shader_materials.md @@ -24,3 +24,21 @@ Edit the newly created shader, and the shader editor will open:

+There are three code tabs open, the first is for the vertex shader, the second for the fragment and the third for the lighting. The shader language is documented in it's [own section](shader) so a small example will be presented next. + +Create a very simple fragment shader that writes a color: + +```c++ +uniform color col; +DIFFUSE = col.rgb; +``` +Code changes take place in real-time. If the code is modified, it will be instantly recompiled and the object will be updated. If a typo is made, the editor will notify of the compilation failure: + +

+ +Finally, go back and edit the material, and the exported uniform will be instantly visible: + +

+ +This allows to very quickly create custom, complex materials for every type of object. +