The fragment-shader tag has no wiki summary.
4
votes
1answer
76 views
GL ES: Fragment shader optimization
Summary:
I get FPS slowdown as soon as I try to tint the sprites (i.e: multiply texture with color in the fragment shader)
Details:
Hardware: iPod touch 4
I am drawing 700 sprites on the screen ...
3
votes
1answer
75 views
What is a Fragment Pipe?
I remember someone saying "24 fragment pipes on nVidia 7800" in a presentation.
Am I correct in saying that a fragment is the data that can generate a pixel in the frame buffer? Or are fragments the ...
1
vote
1answer
49 views
I have a frag shader, one with an empty s_lightMap, how and why is it effecting the output?
I have an image of concrete rocks of different shades of colors, and I'm applying this shader, but without referencing s_lightMap's uniform in my program:
precision mediump float; ...
1
vote
1answer
131 views
GL_EXT_shadow_samplers killing my shader
I have the following fragment shader for my scene
#extension GL_EXT_shadow_samplers : require
...
vec4 color = texture2D(uTextureUnit0, varTexCoord0);
if (colorTransformEnabled != 0) {
vec3 ...
0
votes
1answer
70 views
How to alter the angle of texture projection
I'm currently working on a 3Dish game; it's on a grid, with 3D props and the camera looking down on the grid at about 45ยบ, but I want to use 2D sprites for the player and NPCs.
Currently, I'm using a ...
0
votes
1answer
156 views
How to do Triplanar Texturing
Ok maybe i'm missing something because its getting late and i've been programming now for about 72 hours straight (minus a nap or 2) ...
I'm trying to write a shader for unity that will apply ...
2
votes
0answers
62 views
Fragments never falling into spot light's cone
I am using GLSL version 1.20 with OpenGL 2.1 .
I am trying to compute when a fragment falls into the area of a spot light. I have already set all the light values with glLightfv and glLightf, also ...
1
vote
1answer
239 views
Apply portion of texture atlas
I'm trying to write a shader that only maps a portion of a large texture to my sprite and I'm getting a strange behaviour with my current code.
This is what I have right now:
Texture atlas ...
2
votes
1answer
269 views
shader coding: calculate screen coordinates of fragment
Good morning,
I'm new to shader coding and trying to implement some visual effects code in shaders using billboards. (Yes, I couldn't have picked anything harder to start with, but I'm lucky that way)
...
11
votes
1answer
546 views
Toon/cel shading with variable line width?
I see a few broad approaches out there to doing cel shading:
Duplication & enlargement of model with flipped normals (not an option for me)
Sobel filter / fragment shader approaches to edge ...
0
votes
0answers
158 views
cocos2d fragment shader transparency
I'm playing with custom fragment shaders for a CCSprite (see http://www.raywenderlich.com/4428/how-to-mask-a-sprite-with-cocos2d-2-0).
But I can't figure out why I get a white color whith the ...
4
votes
3answers
114 views
How to read BC4 texture in GLSL?
I'm supposed to receive a texture in BC4 format.
In OpenGL, i guess this format is called GL_COMPRESSED_RED_RGTC1.
The texture is not really a "texture", more like a data to handle at fragment ...
1
vote
3answers
402 views
GLSL mesh discard command?
Is there a GLSL command similar to the discard, but it discards the whole mesh and not just a fragment?