0
votes
1answer
106 views

HLSL postprocessing for day to night (DTN)

I am trying to implement a "day-to-night"-filter (as commonly used in cinema) for a 2D game (XNA) by using a full screen HLSL pixel shader. The aim is to transform any bright and colorful image into a ...
14
votes
1answer
492 views

Rendering oily/polluted water?

Any shader wizards out there have an idea of how to achieve an oily/polluted water effect, similar to this: Ideally, the water would not be uniformly oily, but instead the oil could be generated ...
2
votes
3answers
328 views

XNA 3.1 to 4.0 Vertex Shader Not Drawing

I have recently been converting our XNA 3.1 game to XNA 4.0 and am stuck on the shaders. I have the game running, but nothing is drawing to the screen, except things not using a shader. This is only ...
0
votes
2answers
99 views

HLSL Pixel Shader Compile, Flow Control, Instruction Count, XNA Issue

im trying to find help with an issue im having moving from the XNA 3.1 framework to XNA 4.0. The shaders I wrote for my 2D game work fine in XNA 3.1, but wont even compile in 4.0. At first I got ...
3
votes
0answers
404 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: ...
6
votes
1answer
357 views

Changing water color based on depth

I'm looking to make a water shader that colors the water based on its depth. Up until now my water shader that I've used has basically been extremely reflective and only looked somewhat blue because ...
1
vote
1answer
500 views

Porting an HLSL 3.0 shader to 2.0?

I have a couple of .fx files from a Shader-Based 2D Shadows example. I want to utilize the same kind of technique with XNA 4.0's Reach profile, which if I understand correctly needs to have HLSL 2.0 ...
12
votes
3answers
1k views

HLSL Translucent Plastic Shader

I'm trying to produce a shader to replicate a white plastic object with a colored light inside. Either by having a shader that will be translucent and if I put a light inside the object the light will ...