Содержание
- 2. Graphics Gems for Games Emil Persson Senior Graphics Programmer @_Humus_ Findings from Avalanche Studios
- 3. Graphics Gems for Games Particle trimming Merge-instancing Phone-wire Anti-Aliasing Second-Depth Anti-Aliasing
- 4. Graphics Gems for Games Particle trimming
- 5. Particle trimming GPUs increasingly more powerful ALU – Through the roof TEX – Pretty decent increase
- 6. Particle trimming Typical ROP bound cases Particles Clouds Billboards GUI elements Solutions Render to low-res render
- 7. Particle trimming Common with large alpha=0 areas Wasted fillrate Adjust particle geometry to minimize waste Automated
- 8. Particle trimming Huge fillrate savings More vertices ⇒ Bigger saving Diminishing returns Just Cause 2 used
- 9. Particle trimming First attempt: Manual trimming Tedious, but proved the concept OK for our cloud atlas
- 10. Particle trimming Algorithm Threshold alpha Add each solid pixel to convex hull Optimize with potential-corner test
- 11. Particle trimming Original texture
- 12. Particle trimming Thresholded texture
- 13. Particle trimming Convex hull
- 14. Particle trimming Reduced convex hull
- 15. Particle trimming Final 4 vertex polygon (60.16%)
- 16. Particle trimming Final 6 vertex polygon (53.94%)
- 17. Particle trimming Final 8 vertex polygon (51.90%)
- 18. Particle trimming Issues Polygon extending outside original quad No problem for regular textures. Use CLAMP. May
- 19. Graphics Gems for Games Merge-Instancing
- 20. Merge-Instancing Instancing One mesh, multiple instances Merging Multiple meshes, one instance of each What about: Multiple
- 21. Merge-Instancing
- 22. Merge-Instancing Instancing Merge-Instancing for (int instance = 0; instance for (int index = 0; index VertexShader(
- 23. Merge-Instancing Implemented in Just Cause 2 on Xbox360 Draw-calls less of a problem on PS3 /
- 24. Merge-Instancing Merging odd sized meshes Choose common frequency Duplicate instance data as needed Pad with degenerate
- 25. Graphics Gems for Games Phone-wire Anti-Aliasing
- 26. Phone-wire AA Sources of aliasing Geometric edges Mostly solved by MSAA Post-AA usually works too Breaks
- 27. Phone-wire AA Sources of aliasing Geometric edges Mostly solved by MSAA Post-AA usually works too Breaks
- 28. Phone-wire AA Phone-wires Common game content Often sub-pixel sized MSAA helps … but not that much
- 29. Phone-wire AA Phone-wires Long cylinder shapes Defined by center points, normal and radius Avoid going sub-pixel
- 30. Phone-wire AA Demo + source available! [5] // Compute view-space w float w = dot(ViewProj[3], float4(In.Position.xyz,
- 31. Phone-wire AA off, MSAA 4x
- 32. Phone-wire AA on, MSAA 4x
- 33. Graphics Gems for Games Second-Depth Anti-Aliasing
- 34. Second-Depth Anti-Aliasing Filtering AA approaches SIGGRAPH 2011 - ”Filtering Approaches for Real-Time Anti-Aliasing” [6] Post-AA MLAA
- 35. Second-Depth Anti-Aliasing Depth buffer and second-depth buffer Depth is linear in screen-space Simplifies edge detection Enables
- 36. Second-Depth Anti-Aliasing Attempt crease case first Look at depth slopes Compute intersection point Valid if distance
- 37. Second-Depth Anti-Aliasing Try as silhouette Neighbor depths useless Look at second-depths Compute intersection point Used if
- 38. Second-Depth Anti-Aliasing Results Demo + source available! [7]
- 39. References [1] http://en.wikipedia.org/wiki/Comparison_of_AMD_graphics_processing_units [2] http://www.humus.name/index.php?page=News&ID=266 [3] http://www.humus.name/index.php?page=Cool&ID=8 [4] http://www.csee.umbc.edu/~olano/papers/lean/ [5] http://www.humus.name/index.php?page=3D&ID=89 [6] http://iryoku.com/aacourse/ [7] http://www.humus.name/index.php?page=3D&ID=88
- 41. Скачать презентацию