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.
13 questions
2
votes
1
answer
196
views
Basic GLSL fragment shader with palette lookups and palette shift
I am remaking an old game, which animates water by rotating its palettes over time.
I have written a basic fragment shader to replicate this behavior. It checks which color we are trying to render, ...
1
vote
1
answer
625
views
1
vote
1
answer
495
views
OpenGL Shader Loader in C++
I made my own custom OpenGL shader loader for C++. Please tell me is I'm doing anything incorrectly or anything to improve on. I've tested this and it works perfectly fine.
main.cc
...
8
votes
1
answer
186
views
tiny mandelbrot
When I first got the idea for creating a tiny mandelbrot renderer I knew It would be possible
since people having creating tiny demos for a while and that I would probably use a shader. However at ...
7
votes
2
answers
773
views
2D Real-Time Ray-tracing
I've written a 2D ray-tracer in GLSL ES for GameMaker for dynamic lighting. I've also written a blog post on how it works... though it is out-dated. I am looking to have JUST my shaders reviewed to ...
2
votes
1
answer
300
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
1
answer
793
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
0
answers
2k
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
2
answers
179
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 ...
9
votes
2
answers
1k
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
1
answer
1k
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
2
answers
3k
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
1
answer
4k
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 ...