Tagged Questions
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 ...
9
votes
3answers
293 views
Outline sprites
I'm currently working on a 2D game, and my current task is to outline selected object.
I basically use a blur shader to do it fully runtime.
I first draw my sprite using a vertical gaussian blur ...
0
votes
2answers
328 views
HLSL shader optimization [closed]
The following HLSL shader (without preprocessing) results in 65 arithmetic operations (see below). Can the same effect achieved with <=64 operations?
// Center of "light"
float x;
float y;
// ...
1
vote
1answer
429 views
Need to combine a color, mask, and sprite layer in a shader
My task: to display a sprite using different team colors. I have a sprte graphic, part of which has to be displayed as a team color. The color isn't 'flat', i.e. it shades from brighter to darker. I ...
2
votes
1answer
785 views
Why is a fully transparent pixel still rendered?
I am trying to make a pixel shader that achieves an effect similar to this video http://www.youtube.com/watch?v=f1uZvurrhig&feature=related
My basic idea is render the scene to a temp render ...
0
votes
2answers
1k views
How to achieve after-image pixel shader effect
How would one go about writing a pixel shader like this one in XNA 4.0?
http://www.youtube.com/watch?v=f1uZvurrhig&feature=related
1
vote
1answer
630 views
How to set TextureFilter to Point to make example Bloom filter work?
I have simple app that renders some particles and now I am trying to apply the bloom shader from the xna samplers ( http://create.msdn.com/en-US/education/catalog/sample/bloom ) to it, but I am ...
2
votes
1answer
250 views
How to access the nth element in a 2d texture from a pixel shader in XNA
How can I access the nth element in a texture2d from a pixel shader? For example if I wanted to get the 5th vector4 from 10 x 10 texture2d
0
votes
2answers
231 views
What does tex1D do with a 2d texture?
If I call tex1d from my pixel shader on a texture that has been initialized as a texture2d will it treat the data as a one dimensional array and then just take the element at whichever position you ...
