Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
transparency [2020/01/09 09:19] – created admin | transparency [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Transparency ====== | ||
- | Transparency rendering is a huge topic in 3D development. | ||
- | A great deal of effort has been put into finding a perfect solution to the problem of correctly displaying transparency. | ||
- | |||
- | The most common but most bad solution is transparency sorting. | ||
- | Delphi FMX uses this algorithm, by sorting elements in z-order to camera position. | ||
- | |||
- | Take a further read at: | ||
- | [[https:// | ||
- | |||
- | The result is incorrect, which some of you already found out by using multiple components of a TTextLayer3D. FMX renders artifacts if rendering order is not correct which leads to bad results. | ||
- | |||
- | ===== Order-Independent Rendering ===== | ||
- | |||
- | With v0.8.1.x we implemented weighted blended order-independent transparency. | ||
- | |||
- | Link: [[http:// | ||
- | |||
- | This solution is more complex but leads to much better results, without any performance costs. | ||
- | In basically it renders all opaque objects at first. Afterwards it renders all translucent objects into a buffer by a specific algorithm. In the end all is merged together into the final image. | ||
- | |||
- | By implementing this method some significant changes have been made to Gorilla3D and to the usage of 3D elements. | ||
- | FMX already provides the " | ||
- | |||
- | ==== Usage ==== | ||
- | |||
- | When building apps with transparent elements you now have to take care of the " | ||
- | The " | ||
- | |||
- | ==== Advantages ==== | ||
- | |||
- | Weighted Blended Order-Independent Transparency is __fast__ in rendering and leads to __good results__ without any performance costs. In deed it's a bit faster than by transparency sorting, but due to management overhead the results are quite even. As this is a stochastic algorithm, the limitations are crucial. | ||
- | |||
- | ==== Limitations ==== | ||
- | |||
- | Weighted Blended Order-Independent Transparency do not know zero transparency colors. This means, if you expect a nearly not-transparent object to be renderedm, it may lead to overlay problems. | ||
- | Declare an object as " |