0

I want to blur objects in my 3D scene according to the object's z coordinate (the coordinate going into the screen). Say for z=5 blur amount=0, z=10 blur=50, z=-30 blur=40. This has to happen for every object.

  1. How can I do this?
  2. Do I have to use directx 9.0c or up to implement this (because of shaders)?

Do I make use of the Z buffer? I'm a bit new to DirectX.

4

1 回答 1

1

它被称为景深这是一些不错的阅读,是的,它需要着色器。

要实现简单的自由度,您可以渲染场景两次:

  1. 渲染到纹理的一半(在中间进行前剔除,在场景结束时进行后剔除)。

  2. 用这个纹理渲染四边形(用简单的着色器模糊它)。

  3. 在顶部渲染前半部分(场景中间有背面剔除)

于 2012-11-21T07:19:18.510 回答