[3013] | 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 |
|
---|
[3081] | 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 |
|
---|
[3212] | 48 | working but already done!
|
---|
[3081] | 49 |
|
---|
[3212] | 50 |
|
---|
[3081] | 51 | problems:
|
---|
| 52 |
|
---|
| 53 | 4) update of converged regions
|
---|
| 54 |
|
---|
| 55 | something could become visible
|
---|
| 56 |
|
---|
| 57 | a) from outside
|
---|
| 58 | b) from previously occluded regions
|
---|
| 59 |
|
---|
| 60 | a) could use ratio of samples outside current frame / last frame
|
---|
| 61 | but slows donw code
|
---|
| 62 |
|
---|
| 63 | 5) dynamic objects:
|
---|
| 64 |
|
---|
| 65 | a) make ao stick on object: this should
|
---|
| 66 | be possible somehow, as the information is still available!!
|
---|
| 67 |
|
---|
| 68 | tried to use difference of ao intensity between previous and
|
---|
| 69 | current frame to find out if pixel ao is not valid anymore.
|
---|
| 70 | but problems as some flickering was introduced while update of
|
---|
| 71 | dynamic objects was not fast enough (annoying grey fade effect)
|
---|
| 72 |
|
---|
| 73 | b) fix the contact shadow on the floor:
|
---|
| 74 |
|
---|
| 75 | check when pixel not valid anymore: do that by checking for each
|
---|
| 76 | sample if they were invalidated recently. if so, then invalidate
|
---|
| 77 | current pixel ao. for each point, theoretically you don't have
|
---|
| 78 | to compare the depth of the current pixel, but the depth of the
|
---|
[3120] | 79 | samples taken for ao
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 | idea for incorporation of dynamic objects:
|
---|
| 83 |
|
---|
| 84 | store object id with render target
|
---|
| 85 | for each object we know the trafo
|
---|
| 86 | when doing the back projection =>
|
---|
| 87 |
|
---|
| 88 | as usual:
|
---|
| 89 | we have the world space position of the current pixel
|
---|
| 90 | find pixel from last frame using the old projection view trafo
|
---|
| 91 |
|
---|
| 92 | but now we first apply the inverse transformation that brought the
|
---|
| 93 | last pixel to the current pixel and then the old projection view!!
|
---|
| 94 |
|
---|
| 95 | => now we do the equality comparison as usual
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 | for reducing flickering:
|
---|
| 99 |
|
---|
| 100 |
|
---|
[3172] | 101 | keep chain of kernels constant based on the state of convergence=>
|
---|
| 102 |
|
---|
| 103 | only use a single kernel, rotate based on noise texture
|
---|
| 104 | we use fixed offset into the noise texture based on the #frames samples were accumulated
|
---|
| 105 |
|
---|
| 106 | problem:
|
---|
| 107 |
|
---|
[3203] | 108 |
|
---|
| 109 |
|
---|
| 110 | =========================
|
---|
| 111 |
|
---|
| 112 | 1) ssao filter kernel: grows smaller too fast => flickering ... use
|
---|
| 113 | adaptive number of samples instead of size?
|
---|
| 114 | 2) fix color bleeding
|
---|
[3219] | 115 | 3) fix ssao2 so that ssao contribution stays constant for both methods
|
---|
[3203] | 116 | 4) find physical expressions for constants in ssao
|
---|
| 117 | 5) retry normal discontinuity for ssao filter
|
---|
| 118 | 6) fix adaptive sampling for ssao and ssao2
|
---|
| 119 | a) sample adaptive if found invalid sample
|
---|
| 120 | b) sample adaptive if number of valid samples small?
|
---|
| 121 |
|
---|
| 122 | q: is it good to choose new weight as we do? (approx 4 frames)
|
---|
[3212] | 123 | or shouldn't we just completely reset sample?
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 |
|
---|
| 127 | shading todo:
|
---|
| 128 |
|
---|
| 129 | bloom
|
---|
| 130 | dof
|
---|
| 131 | lense flar
|
---|
| 132 | god rays
|
---|
| 133 | sun disc
|
---|
[3219] | 134 | environment lighting
|
---|
| 135 |
|
---|
| 136 | 1) antialiasing very slow: try separable filter and one direction at a time
|
---|
| 137 | 2) try cross filter for ssao without tempcoh
|
---|
| 138 | 3) fix model directory => clean up structure (city/model => models ?)
|
---|
| 139 | 4) fix namespaces: one main namespace for core functions + math functions?
|
---|
| 140 | one util namespace
|
---|
| 141 |
|
---|
| 142 | 5) clean up hacks:
|
---|
| 143 |
|
---|
| 144 | normalmapping
|
---|
| 145 | render target flipflopping for tone mapping
|
---|
| 146 | scenequery
|
---|
| 147 |
|
---|
[3225] | 148 | fix walk speed for deferred shading
|
---|
| 149 |
|
---|
| 150 | fix color bleeding
|
---|
| 151 | fix ao2
|
---|
| 152 | fix full resolution mode
|
---|
| 153 |
|
---|
| 154 | for the paper: make ao more efficient, for example we do not need to downsample normal texture for ao version 1
|
---|
[3228] | 155 | also for full resolution mode: test what happens if we do not use downsampling, look why currently so slow with full resolution (was previously > 80 frame or so!!)
|
---|
| 156 |
|
---|
| 157 |
|
---|
| 158 | ///////////////
|
---|
| 159 |
|
---|
| 160 | always update tempcoh after changes to sample intensity usw.
|
---|
| 161 | make halton sequence local to sampling method, no global static!!
|
---|
| 162 |
|
---|
| 163 |
|
---|
[3276] | 164 | make better DOF
|
---|
| 165 |
|
---|
| 166 | clouds
|
---|
| 167 |
|
---|
| 168 | god rays
|
---|
| 169 |
|
---|
| 170 | animation
|
---|
| 171 |
|
---|
| 172 |
|
---|
| 173 | ################################
|
---|
| 174 | ## pompeii todo:
|
---|
| 175 |
|
---|
| 176 | 1) improve performance:
|
---|
| 177 | make better objects (jiri?)
|
---|
| 178 |
|
---|
| 179 | 2) use better bvh code (also use size to handle floor plane)
|
---|
| 180 |
|
---|
| 181 | 3) shading problems:
|
---|
| 182 |
|
---|
| 183 | create own normals:
|
---|
| 184 |
|
---|
| 185 | flat normals
|
---|
| 186 | use crease angles
|
---|
| 187 |
|
---|
| 188 | find out about degenerate vertices
|
---|
| 189 |
|
---|
| 190 | find out about missing texcoords
|
---|
| 191 |
|
---|
| 192 |
|
---|
| 193 | #####################################
|
---|
| 194 |
|
---|
[3280] | 195 | fix shadows
|
---|
| 196 |
|
---|
[3295] | 197 | find out ssao artifacts on edges (near edge no ambient occlusion)
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 | ///////////
|
---|
| 201 |
|
---|
| 202 | shadows not working proberly with chc!!! (too many triangles, slow!!)
|
---|
| 203 |
|
---|
[3296] | 204 | sibenik: textures dissappear!!
|
---|
| 205 |
|
---|
| 206 | optimize!!
|
---|
| 207 | full resolution, sky test (stencil??), shadows
|
---|
| 208 | smaller textures??
|
---|
| 209 | test normal ssao with simpler shader!
|
---|
| 210 |
|
---|
| 211 | fix normals!! |
---|