The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [glsl]

The GLSL tag is for questions that contain code written using the OpenGL Shading Language. GLSL is a high-level shading language based on the syntax of C. It was created by the OpenGL ARB (OpenGL Architecture Review Board) to give developers more direct control of the graphics pipeline without having to use assembly languages or hardware-specific languages.

Filter by
Sorted by
Tagged with
2
votes
1answer
84 views

Convert an integer to 4 bytes without bitshift operators

This code is applicable to either GLSL or C due to virtually identical syntax. Before GLSL 1.3, bitshift operators were not present and I am aiming for backwards compatibility to GLSL 1.2. ...
3
votes
1answer
29 views

GLSL Shader that displays a Rotating Rainbow Ring

I'm learning GLSL shaders on Book of Shaders and I decided to mess around with one of the examples. I wanted to see, whats a more efficient way to calculate to mask out the color? ...
5
votes
0answers
973 views

3D FPS Camera in OpenGL

So I've got a basic FPS camera working which can move around the 3D space. Having trouble with physics but thats not why I'm here! So the code below creates a scenegraph which contains torus model ...
3
votes
2answers
71 views

GLSL function used to differentiate between pixels above/below a line

I've recently acquired a program which is capable of using a GLSL fragment shader as a plugin. After a short amount of experimentation, I've realized that - for my use-case - I desperately need a ...
4
votes
1answer
758 views

OpenGL 3 Mandelbrot Set

I've written a short program to learn about computing with drawing using OpenGL 3. To do so, I created a program to create two triangles, which form a quad, and pass all the arguments for computing ...
3
votes
1answer
945 views

Drawing a colored rectangle on-screen

I have made my first program that draws a colored rectangle on-screen. I want to know the best practices of making OpenGL and GLSL programs. ...
6
votes
2answers
2k views

2D OpenGL tile atlas fragment shader

I am currently using the following glsl code to retrieve separate textures from a tile atlas: ...
2
votes
1answer
3k views

YUYV OpenGL Fragment Shader

I made a shader to display a YUYV surface (data arranged as: Y0 U0 Y1 V0). It's working, but I don't know anything about shaders, or openGL, or anything graphic related as a matter of fact. I feel ...