Loading...
  OR  Zero-K Name:    Password:   

Post edit history

Depth of Field Shader

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
11/30/2016 11:05:35 AMUSrankaeonios before revert after revert
Before After
1 I actually made this for 0ad a while ago, but for various reasons it never made it into the game. Since I've been shadering recently I figured why not port it to zk? We can use all the shinies we can get. :) 1 I actually made this for 0ad a while ago, but for various reasons it never made it into the game. Since I've been shadering recently I figured why not port it to zk? We can use all the shinies we can get. :)
2 \n 2 \n
3 The actual shader is really simple. It just interpolates between the full res screen image and a 1/4 scale image based on linear distance. I decided to use 2D distance instead of 3D so that when you have the camera zoomed out things near the camera won't be excessively blurry. That means under normal camera angles the stuff you're looking directly at won't be blurred but things that are 'far away', ie at the top of the screen will. I think the effect is pretty nice and it's not particularly performance heavy either. 3 The actual shader is really simple. It just interpolates between the full res screen image and a 1/4 scale image based on linear distance. I decided to use 2D distance instead of 3D so that when you have the camera zoomed out things near the camera won't be excessively blurry. That means under normal camera angles the stuff you're looking directly at won't be blurred but things that are 'far away', ie at the top of the screen will. I think the effect is pretty nice and it's not particularly performance heavy either.
4 \n 4 \n
5 Only two pictures this time. :P 5 Only two pictures this time. :P
6 \n 6 \n
7 [img]https://s15.postimg.org/hxrqz9dzd/screen00173.png?dl=1[/img] 7 [img]https://s15.postimg.org/hxrqz9dzd/screen00173.png?dl=1[/img]
8 \n
9 [img]https://s14.postimg.org/xeyuo911r/screen00175.png?dl=1[/img] 8 [img]https://s14.postimg.org/xeyuo911r/screen00175.png?dl=1[/img]