Tagged Questions
GLSL is a programming language for OpenGL shaders.
0
votes
0answers
37 views
What is a right datatype in c++ for OpenGL scene representation with use of GLSL
I am programming in C++ OpenGl with GLSL. Until now I have been using a data structure that is composed of std vector filled with structures of vertexes and with their parameters (position , normal, ...
9
votes
1answer
211 views
How do I create good looking plasma explosion effects?
Is this just a billboard quad with a bloom shader?
6
votes
3answers
266 views
Go pure OpenGL or GLSL?
I got interested in studying graphic programming so the obvious entry point was to learn OpenGL. But gathering scattered information around forums and sites, it seems that a pure OpenGL implementation ...
3
votes
1answer
112 views
What do the components of gl_TexCoord[0] mean?
What are the differences between gl_TexCoord[0].s, gl_TexCoord[0].t gl_TexCoord[0].p and gl_TexCoord[0].x, gl_TexCoord[0].y gl_TexCoord[0].z ?
I understand that gl_TexCoord[0].x, gl_TexCoord[0].y ...
1
vote
1answer
91 views
Optional samplers in shaders
I have a scene. Sometimes I draw untextured, coloured, semi-transparent triangles, sometimes I texture them, and I draw a lot of both in a fairly interleaved manner.
In a fixed function pipeline the ...
1
vote
1answer
56 views
Setting the values of a struct array from JS to GLSL
I've been trying to make a structure that will contain all the lights of my WebGL app, and I'm having troubles setting up it's values from JS. The structure is as follows:
struct Light {
vec4 ...
1
vote
1answer
126 views
How can I write only to the stencil buffer in OpenGL ES 2.0?
I'd like to write to the stencil buffer without incurring the cost of my expensive shaders. As I understand it, I write to the stencil buffer as a 'side effect' of rendering something. In this first ...
2
votes
1answer
185 views
Renderbuffer to GLSL shader?
I have a software that performs volume rendering through a raycasting approach. The actual raycasting shader writes the raycasted volume depth into a framebuffer object, through gl_FragDepth, that I ...
1
vote
1answer
148 views
Why am I seeing streak artifacts on the cube map I'm rendering?
I'm getting strange streaks on my cube map when rendering to it. He is my code that is being called each frame:
void drawCubeMap(void)
{
int face;
glClear(GL_COLOR_BUFFER_BIT | ...
0
votes
0answers
55 views
texture2DLodOffset( ) in Mac 10.6
I am writing a FXAA shader in glsl for achieving full screen anti-aliasing.But when i compile the shader with the texture2DLodOffset(), the compiler shows an error : "no matching overload function ...
6
votes
1answer
455 views
OpenGL/GLSL: Render to cube map?
I'm trying to figure out how to render my scene to a cube map. I've been stuck on this for a bit and figured I would ask you guys for some help. I'm new to OpenGL and this is the first time I'm using ...
3
votes
2answers
139 views
OpenGL, Offset and Camera Space
I was reading chapter 4 of the Arcsyntesis OpenGL tutorial when I came across this line in the GLSL shader.
vec4 cameraPos = position + vec4(offset.x, offset.y, 0.0, 0.0);
About it, the tutorial ...
3
votes
1answer
103 views
How does one get adjacency information in a geometry shader?
If you use triangle_adjacency as the input type of a geometry shader, do you need to do something on the client side besides make the primitive mode triangle_adjacency?
Basically what I'm asking do ...
3
votes
1answer
164 views
GLSL Core Functionality Geometry Shader examples
I'm doing some research on geometry shaders and am having problems finding code examples/tutorials that does not use one of the extensions introduced before it was core functionality of OpenGL 3.2.
...
1
vote
1answer
214 views
Pygame water ripple effect
I have Googled for it but there are no ready scripts - as opposed to the same effect on Flash. I have checked the algorithm on The Water Effect Explained and also tested an implementation of the ...