Fun with Shaders in BF2142 (DX9) - Part 1: Blood Rain





Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Nov 18, 2009

Now that I started studying HLSL I can try some things out regarding shaders in Battlefield 2142. I'm sorry for the screenformat, my monitor has an ugly 5:4 ratio.

This one is just (stupid) simple. I started with the rain.fx shaderprogram, modified the "line method" and decided the rain to be drawn with red color onto the screen. It's really easy, one has to modify the pixel shader method to set the pixels red color value to 1, and the green and blue values to 0:

vec4 psLine(LINE_VSOUT input) : COLOR
vec4 Color = input.Color;
Color.ra = 1;
Color.gb = 0;
return Color;

Well it took some time until I got this to work, 'cause everytime I tried out to modifiy the shader program I had to delete the compiled shaders BF created before and restart the game. Then I had to wait until the Shader Optimization was finished (I think that's the part, where the shaders are compiled). As you may recognize in the video, I had to cut one piece of footage out, it would have lasted over 2 minutes and I don't think it is interesting staring at a static screen. ^^

In Part 2 I will try to play around with the water-shaders, I really want to get some nice effects with it. :D

And no... there is no reference to Blood Rayne in the video's title. :P


When autoplay is enabled, a suggested video will automatically play next.

Up next

to add this to Watch Later

Add to

Loading playlists...