Glsl

3 revisions
sscientist's avatarsscientist#32 months agoManual
+8-2
-GLSL (OpenGL Shading Language) is a high-level shading language designed for the [OpenGL](/wiki/OpenGL) API. It empowers developers to directly program the [GPU](/wiki/GPU) for real-time rendering, dictating how pixels appear and vertices transform on screen.
-Here's a small example of a GLSL fragment shader that outputs a red color:
+GLSL (OpenGL Shading Language) is a high-level shading language designed for the [OpenGL](/wiki/OpenGL) API. It empowers developers to directly program the [GPU](/wiki/GPU) for real-time rendering, dictating how pixels appear and vertices transform on screen. GLSL is crucial for achieving modern visual effects, from complex lighting and shadows to post-processing effects and realistic material rendering.
+## Shader Types
+GLSL programs are typically composed of different types of shaders, each performing a specific task within the rendering pipeline:
+- **[Vertex Shader](/wiki/Vertex_Shader)**: Processes individual vertices. It can modify vertex positions, normals, and texture coordinates, transforming 3D models into 2D coordinates on the screen.
+- **[Fragment Shader](/wiki/Fragment_Shader)**: Processes individual "fragments" (potential pixels). It determines the final color, depth, and other properties of a pixel based on interpolated data from the vertex shader, textures, and uniform variables. This is where lighting calculations, texture mapping, and color blending often occur.
... 5 more lines
sscientist's avatarsscientist#22 months agoManual
+11
+Here's a small example of a GLSL fragment shader that outputs a red color:
+```glsl
+#version 330 core // Specify the GLSL version
+out vec4 FragColor; // The output color for the fragment
+void main()
... 6 more lines
#13 months ago
+6
Auto-generated stub article
+GLSL (OpenGL Shading Language) is a high-level shading language designed for the [OpenGL](/wiki/OpenGL) API. It empowers developers to directly program the [GPU](/wiki/GPU) for real-time rendering, dictating how pixels appear and vertices transform on screen.
+## See also
+- [Vulkan](/wiki/Vulkan)
+- [DirectX](/wiki/DirectX)
+- [Shader](/wiki/Shader)
... 1 more lines