Tagged Questions
2
votes
1answer
116 views
Pixel Shader gradient problems
I have pretty much zero experience working with shaders as my first couple phone games were just 2d games that didn't use any sort of shaders. Now I'm working on a PC game that has a day and night ...
0
votes
0answers
94 views
Using OpenGL3.3 and GLSL, texturing is not working [closed]
I am having troubles getting texturing working in my OpenTK/OpenGL 3.3 code. I am sure it is something simple that I am missing, but I just can't seem to get a texture on the square I am rendering. ...
0
votes
0answers
158 views
How do I make a more or less realistic water surface?
I want to make a similar water surface like in this picture: http://www.publicdomainpictures.net/pictures/20000/velka/water-surface-detail-11291208064MpI.jpg
I need the water surface in the same view ...
1
vote
2answers
302 views
HLSL Pixel Shader that does palette swap
I have implemented a simple pixel shader which can replace a particular colour in a sprite with another colour.
It looks something like this:
sampler input : register(s0);
float4 ...
1
vote
1answer
186 views
XNA Shader Texture Memory
I was wondering about texture optimization in XNA 4.0.
Will the the contentmanager send the texturedata to the GPU directly when the texture gets loaded or do I send the texture data to the GPU when ...
5
votes
2answers
601 views
How can I acheive a smooth 2D lighting effect?
I'm making a tile based game in XNA.
So currently my lightning looks like this:
How can I get it to look like this?
Instead of each block having its own tint, it has a smooth overlay.
I'm assuming ...
1
vote
1answer
897 views
How to make 2D water like in this video?
I wanna make water and waves for my little 2D PC game like in this video:
http://www.youtube.com/watch?v=ooU6cTeirlQ
I don't know how to write a similar shader. Does anybody know how to write a ...
1
vote
0answers
169 views
Outline Shader Effect for Orthogonal Geometry in XNA
I just recently started learning the art of shading, but I can't give an outline width to 2D, concave geometry when restrained to a single vertex/pixel shader technique (thanks to XNA).
the shape I ...
5
votes
3answers
412 views
XNA shader compiler error in release mode
I'm having a hard time figuring out if I'm doing something wrong, or if there is a bug with Visual Studio.
I want to pass a float into my pixel shader, clamp it to a value, and then return it as part ...
2
votes
1answer
835 views
Drawing simple geometric figures with DrawUserPrimitives?
I'm trying to draw a simple triangle based on an array of vertex. I've been searching for a tutorial and I found a simple example on riemers but I couldn't get it to work.
I think it was made for XNA ...
0
votes
0answers
273 views
Problem loading shaders with slimdx
I'm attempting to load an FX file in slimdx, I've got this exact FX file loading and compiling fine with XNA 4.0 but I'm getting errors with slimdx, here's my code to load it.
using ...
4
votes
2answers
330 views
Detect Mip mapping level in the shader?
Is there a way to do this in pixel shader 2.0/3.0? I've got on or off transparency so when the mipmapping level is different the transparency can take up too much of the texture and make it ...
2
votes
2answers
1k views
Dealing with 2D pixel shaders and SpriteBatches in XNA 4.0 component-object game engine?
I've got a bit of experience with shaders in general, having implemented a couple, very simple, 3D fragment and vertex shaders in OpenGL/WebGL in the past. Currently, I'm working on a 2D game engine ...
0
votes
1answer
208 views
Error X3650 when compiling shader in XNA
I'm attempting to convert the XBDEV.NET Mosaic Shader for use in my XNA project and having trouble. The compiler errors out because of the half globals.
At first I tried replacing the globals and ...
2
votes
1answer
199 views
Implementing IVertexType Interface
In XNA, I have created a new VertexType, called it VertexPositionTextureLight which inherts the IVertexType Interface, but apparently I need to implement the member of VertexDeclartion which I cleary ...