1 | 1) change shader system: look into fx files
|
---|
2 | 2) tone mapping
|
---|
3 | bloom (gaussian blur)
|
---|
4 | use downsampling: first 4x4 to luminance then 3 times further to 1x1
|
---|
5 | use 3 new render render targets for this
|
---|
6 |
|
---|
7 | 3) mrt channels:
|
---|
8 |
|
---|
9 | 2 mrts:
|
---|
10 |
|
---|
11 | mrt 1: rgba color + emmissive / luminance
|
---|
12 | mrt 2: world pos + projected depth
|
---|
13 | mrt 3: normals + w coordinate
|
---|
14 | mrt 4: flip-flop for mrt1
|
---|
15 |
|
---|
16 |
|
---|
17 | 4) idea: donwsample color texture for ao
|
---|
18 |
|
---|
19 | 5) use depth formula on projected depth (or use linear depth)
|
---|
20 | in order to combine ao + diffuse lookup into on texture lookup
|
---|
21 |
|
---|
22 |
|
---|
23 | reorder mrts:
|
---|
24 |
|
---|
25 | mrt 1: rgba color + projected depth
|
---|
26 | mrt 2: luminance
|
---|
27 | mrt 3: normals + w coordinate
|
---|
28 | mrt 4: flip-flop with mrt1 / store luminance after ssao
|
---|
29 |
|
---|
30 |
|
---|
31 | 6) render sun disc
|
---|
32 |
|
---|
33 |
|
---|
34 |
|
---|
35 | ssao:
|
---|
36 |
|
---|
37 | 1) implement bilateral filtering
|
---|
38 | 2) check physical properties
|
---|
39 |
|
---|
40 | paper of 2007 arikan formula:
|
---|
41 |
|
---|
42 | SW(P, C, r) = 2 * pi * (1 - cos(asin (r / |PC|)))
|
---|
43 |
|
---|
44 | but not working properly!
|
---|
45 |
|
---|
46 | 3) normal mapping
|
---|
47 |
|
---|
48 |
|
---|
49 | problems:
|
---|
50 |
|
---|
51 | 4) update of converged regions
|
---|
52 |
|
---|
53 | something could become visible
|
---|
54 |
|
---|
55 | a) from outside
|
---|
56 | b) from previously occluded regions
|
---|
57 |
|
---|
58 | a) could use ratio of samples outside current frame / last frame
|
---|
59 | but slows donw code
|
---|
60 |
|
---|
61 | 5) dynamic objects:
|
---|
62 |
|
---|
63 | a) make ao stick on object: this should
|
---|
64 | be possible somehow, as the information is still available!!
|
---|
65 |
|
---|
66 | tried to use difference of ao intensity between previous and
|
---|
67 | current frame to find out if pixel ao is not valid anymore.
|
---|
68 | but problems as some flickering was introduced while update of
|
---|
69 | dynamic objects was not fast enough (annoying grey fade effect)
|
---|
70 |
|
---|
71 | b) fix the contact shadow on the floor:
|
---|
72 |
|
---|
73 | check when pixel not valid anymore: do that by checking for each
|
---|
74 | sample if they were invalidated recently. if so, then invalidate
|
---|
75 | current pixel ao. for each point, theoretically you don't have
|
---|
76 | to compare the depth of the current pixel, but the depth of the
|
---|
77 | samples taken for ao
|
---|
78 |
|
---|
79 |
|
---|
80 | idea for incorporation of dynamic objects:
|
---|
81 |
|
---|
82 | store object id with render target
|
---|
83 | for each object we know the trafo
|
---|
84 | when doing the back projection =>
|
---|
85 |
|
---|
86 | as usual:
|
---|
87 | we have the world space position of the current pixel
|
---|
88 | find pixel from last frame using the old projection view trafo
|
---|
89 |
|
---|
90 | but now we first apply the inverse transformation that brought the
|
---|
91 | last pixel to the current pixel and then the old projection view!!
|
---|
92 |
|
---|
93 | => now we do the equality comparison as usual
|
---|
94 |
|
---|
95 |
|
---|
96 | for reducing flickering:
|
---|
97 |
|
---|
98 |
|
---|