In OpenGL, I have read that a vertex should be represented by (x,y,z,w), where w = z. This is to enable perspective divide, whereby (x,y,z) are divided by w in order to determine their screen position ...

In OpenGL and GLSL, I am just learning about perspective projection and the vertex shader. However, I am a little confused about what data actually needs to be passed to the vertex shader, and what ...

I'm having a problem with rotating/moving an image. I've set one of my images to rotate on it's z-axis buy updating the angle, but when I run my game, the image starts slowly starts to rotate from a ...

I have an AMD GPU on my desktop, AMD HD 5770.
I am working on a project on my desktop for over a year. In the scene, I have instanced grass and instanced trees. Everything is working fine on desktop, ...

I have tried a while now to create a genie effect on a scrolling plane to emulate the background/floor from the Mad Hatter fight in Adventures of Batman and Robin (SEGA).
Judging the way the 16 bit ...

I'm using the cocos2d-x engine and want to support etc1 on android devices for my game.
For ETC1 i'm using the mali compression tool, and GLSL.
Everything is working, but I can't change the opacity ...

Basically, i'm just trying to find out where to insert the model scale into the lighting calculations. Ive searched the web, but amazingly, couldn't find anything dealing with scale + GLSL.
This is ...

Using OpenGL tutorials found here, I constructed an .obj file loader as well as a texture file loader using SOIL. I have an issue with drawing a textured object. (Shown here) Assuming I created the ...

I am trying to draw over a GL_TRIANGLE_FAN one texture to render video frames, using shaderProgram1, and render above it some points (GL_POINTS) using shaderProgram2.
By this way: (OpenGL Core 4.3)
...

I'm trying to find a half float for the purposes of doing math in a fragment shader, not trying to have a half float texture.
Is there an equivalent of the half float data type in WebGL?
I know you ...

I am trying to create a simple subsurface scattering effect using a shader but I am facing a small issue.
Look at those screenshots. The three images represents three lighting states (above surface, ...

I would like to know how to blend colors in a specific way.
Let's imagine that I have a color (A) and an other color (B).
I would like to blend them in such a way that if I choose white for the (B) ...

I'm new to graphics programming and GLSL in particular. I'm working on a 2D game and the setup is as follows:
There is an image on the screen (a sprite in the game engine [Cocos2d-x if it matters])
...

Right now I am not using any depth information in my engine, but I just found out that it would be neat to be able to render the silhouette of important game objects that are "behind" something with a ...

I'm currently working on an implementation of rectangular area lights but I am having some issues with the illuminance calculation, which gives me serious colour banding across the entire lit area. ...

I'm currently learning opengl but it seems quite complicated so i considered using some library like sdl or allegro. I noticed that allegro has some built in functions to create and attach shaders.
...

I have this simple ShaderLab shader that I use for particles, among other things (it's more complicated than this but I have omitted the unnecessary bits).
When I do not specify a texture, it falls ...

So I have a scene, completely based on 2D sprites. I want to render "light sources" into a seperate frame buffer (so mostly dots around, for example, the centre of a flame) and then render that frame ...

I have no idea, what is going on. The mat4 xxx is the cause. Renaming it to "bones"/"bone_transfromations" etc. won't work it gives me an error. Renaming it to "test" works perfectly fine... This is ...

In several topics here it was suggested by people that doing lighting in tangent space is better than doing it in world space. Right now I am doing it in camera space, but it's really similar to world ...