forked from PeterTh/dsfix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
VSSAO.h
33 lines (24 loc) · 967 Bytes
/
VSSAO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include <dxgi.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <dxerr.h>
#include "Effect.h"
class VSSAO : public Effect {
public:
VSSAO(IDirect3DDevice9 *device, int width, int height, unsigned strength);
virtual ~VSSAO();
void go(IDirect3DTexture9 *frame, IDirect3DTexture9 *depth, IDirect3DSurface9 *dst);
private:
int width, height;
ID3DXEffect *effect;
IDirect3DTexture9* buffer1Tex;
IDirect3DSurface9* buffer1Surf;
IDirect3DTexture9* buffer2Tex;
IDirect3DSurface9* buffer2Surf;
D3DXHANDLE depthTexHandle, frameTexHandle, prevPassTexHandle;
void mainSsaoPass(IDirect3DTexture9 *depth, IDirect3DSurface9 *dst);
void vBlurPass(IDirect3DTexture9 *depth, IDirect3DTexture9* src, IDirect3DSurface9* dst);
void hBlurPass(IDirect3DTexture9 *depth, IDirect3DTexture9* src, IDirect3DSurface9* dst);
void combinePass(IDirect3DTexture9* frame, IDirect3DTexture9* ao, IDirect3DSurface9* dst);
};