![]() Note that we won't discuss all built-in variables that exist in GLSL so if you want to see all built-in variables you can check OpenGL's wiki. We'll discuss a few interesting built-in input and output variables that are built-in in GLSL and explain how they may benefit us. We've already seen two of them in the chapters so far: gl_Position that is the output vector of the vertex shader, and the fragment shader's gl_FragCoord. There are however a few extra variables defined by GLSL prefixed with gl_ that give us an extra means to gather and/or write data. We learned to do this via vertex attributes, uniforms, and samplers. Shaders are extremely pipelined, if we need data from any other source outside of the current shader we'll have to pass data around. We'll discuss some interesting built-in variables, new ways to organize shader input and output, and a very useful tool called uniform buffer objects. Basically some good to knows and features that may make your life easier when creating OpenGL applications in combination with GLSL. This chapter goes more or less into some interesting aspects of GLSL and some nice tricks that may help you in your future endeavors. This chapter won't really show you super advanced cool new features that give an enormous boost to your scene's visual quality. Advanced GLSL Advanced-OpenGL/Advanced-GLSL
0 Comments
Leave a Reply. |