Top "Shader" questions

A shader is a program to perform calculations on geometry or pixel data in computer graphics.

How does the default GLSL shaders look like? for version 330

What do the default vertex, fragment and geometry GLSL shaders look like for version #330? I'll be using #version 330 GLSL Version 3.30 …

glsl shader
OpenGL ES 2.0 Rendering with a Texture

The iPhone SDK has an example of using ES 2.0 with a set of (Vertex & Fragment) GLSL shaders to render …

iphone opengl-es glsl shader
What's the origin of this GLSL rand() one-liner?

I've seen this pseudo-random number generator for use in shaders referred to here and there around the web: float rand(…

glsl shader prng
FXC : error X3501: 'main': entrypoint not found

I am following an example book called: Introduction to 3D Game Programming with DirectX 11 It is all written in VS2010. …

c++ directx shader visual-studio-2013 hlsl
Custom Texture Shader in Three.js

I'm just looking to create a very simple Fragment Shader that draws a specified texture to the mesh. I've looked …

shader textures three.js fragment-shader
Efficiency of branching in shaders

I understand that this question may seem somewhat ungrounded, but if someone knows anything theoretical / has practical experience on this …

performance branch shader
OpenGL bool uniform?

I'm trying to send a boolean to an OpenGL glsl shader. Currently I have this in the shader: uniform bool …

c++ opengl boolean shader
Explicit vs Automatic attribute location binding for OpenGL shaders

When setting up attribute locations for an OpenGL shader program, you are faced with two options: glBindAttribLocation() before linking to …

opengl-es shader opengl-es-2.0
Help with Pixel Shader effect for brightness and contrast

What is a simple pixel shader script effect to apply brightness and contrast? I found this one, but it doesn't …

shader
How to render Android's YUV-NV21 camera image on the background in libgdx with OpenGLES 2.0 in real-time?

Unlike Android, I'm relatively new to GL/libgdx. The task I need to solve, namely rendering the Android camera's YUV-NV21 …

android camera libgdx opengl-es-2.0 shader