A program running on one of the last stages of the pipeline in a graphics card. Geometry information (usually vertex information) from the earlier stages of the pipeline goes through the rasterizer stage and becomes input to the pixel shader which then generates a single color value as output - the ...
2
votes
2answers
93 views
Realtime fisheye to cubic or spherical panorama transformations with OpenGL or pixelshaders
I'd like to transform a sequence of circular fisheye-images to cubic or spherical panorama images to be used in a panorama-viewer based on OpenGL. The viewer-part is nemas problemas but the transform ...
1
vote
1answer
119 views
Pixel Shader - apply a mask (XNA)
I'd like to apply a simple few masks to few images.
The first mask I'd like to implement is mask like:
XXXOOO
I mean, that on the right everything is masked (to black), and on the left everything ...
0
votes
1answer
81 views
Incorrect colour blending when using a pixel shader with XNA
I'm using XNA 4.0 to create a 2D game and while implementing a layer tinting pixel shader I noticed that when the texture's alpha value is anything between 1 or 0 the end result is different than ...
4
votes
0answers
154 views
+50
Optimizing performance of a heavy fragment shader
I need help optimizing the following set of shaders:
Vertex:
precision mediump float;
uniform vec2 rubyTextureSize;
attribute vec4 vPosition;
attribute vec2 a_TexCoordinate;
varying vec2 tc;
...
4
votes
0answers
113 views
Premultiplied Alpha And Alpha Testing
I have a shader that is supposed to work with either alpha blending or alpha testing, but the color values being passed in are premultiplied alpha values.
Is there an easy/standard way to have it ...
2
votes
0answers
378 views
2D Line drawing with Pixel Shaders
Recently I asked a question, what is the fastest way to render 2D lines using DirectX, and one of the answers mentioned this paper on Fast Prefiltered Lines which uses Pixel Shaders to accomplish ...
1
vote
0answers
110 views
How to achieve supersampling / anti-aliasing in pixel shaders?
I am trying to write a couple pixel shaders to apply to images similar to Photoshop effects. For example this effect: ...
1
vote
0answers
384 views
Sprite visual effect in XNA?
Suppose I have a character sprite and I want to apply some animating effect that overlay its color, how would I do it? What I desire is something along this line:
(From final fantasy tactics)
It is ...
1
vote
0answers
1k views
How to implement fisheye effect with a GLSL fragment shader
I would like to render my scene with a wide FOV and then apply a fisheye distortion via fragment shader. How would this shader best be implemented?
Update
I try to reproduce a fisheye effect similar ...
1
vote
0answers
462 views
How can I run the pixel shader effect?
Stated below is the code for my pixel shader which I am rendering after the vertex shader.
I have set the wordViewProjection matrix in my program but I don't know to set the progress variable i.e in ...
0
votes
0answers
34 views
Best approach to depth streaming via existing codec
I'm working on a development system (and game) intended for games set mostly in static third-person views. We produce our scenery by CG and photographic techniques. Our background art is rendered ...
0
votes
0answers
96 views
How to efficiently render resizable GUI elements in DirectX?
I wonder what would be most efficient way to render the GUI elements.
When we're talking about constant-size elements (that can still be moving), the textures' atlas seems to be good.
But what with ...
0
votes
0answers
165 views
What's a good way to organize samplers for HLSL?
According to MSDN, I can have 4096 samplers per context. That's a lot, considering there's only a handful of common sampler states.
That tempts me to initialize an array containing a whole bunch of ...
