Top "Fragment-shader" questions

A GPU program used in rendering.

Vertex shader vs Fragment Shader

I've read some tutorials regarding Cg, yet one thing is not quite clear to me. What exactly is the difference …

opengl cg fragment-shader vertex-shader
GLSL: How to get pixel x,y,z world position?

I want to adjust the colors depending on which xyz position they are in the world. I tried this in …

opengl glsl fragment-shader
How do I get the current color of a fragment?

I'm trying to wrap my head around shaders in GLSL, and I've found some useful resources and tutorials, but I …

opengl shader glsl fragment-shader
How to define constant array in GLSL (OpenGL ES 2.0)?

I just want to store an array of weights that needs to every fragment calculation. This: float weights[5] = float[5](3.4, 4.2, 5.0, 5.2, 1.1); Just …

iphone opengl-es glsl fragment-shader
What does `precision mediump float` mean?

In the learningwebgl tutorial1 I've found an interesting line in the fragment shader. precision mediump float; I've found an article …

javascript opengl-es webgl terminology fragment-shader
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
OpenGL - How to access depth buffer values? - Or: gl_FragCoord.z vs. Rendering depth to texture

I want to access the depth buffer value at the currently processed pixel in a pixel shader. How can we …

opengl glsl shader fragment-shader
Efficient Bicubic filtering code in GLSL?

I'm wondering if anyone has complete, working, and efficient code to do bicubic texture filtering in glsl. There is this: …

glsl fragment-shader bicubic
How to calculate gl_FragCoord in glsl

Ok, in my GLSL fragment shader I want to be able to calculate the distance of the fragment from a …

opengl glsl fragment-shader
YUV to RGB conversion by fragment shader

I've a problem with convertion of camera preview in Android from YUV format to RGB. The purpose of conversion is …

android opengl-es camera shader fragment-shader