1
0
Fork 0

Colin Geniet:

There are 3 relevant render bins for aircraft models:
- 0: default
- 10: depth sorted, automatically selected for transparent objects.
- 111: depth sorted, explicitly set by some transparent effects (hud, glass)

The model-default effect does not set <render-bin> on purpose, to allow
automatic selection of bin 0 or 10. So my second patch which added <render-bin>
to model-default is wrong.
It is only model-transparent which should explicitly set bin 111
to interact well with hud/glass effects.
This commit is contained in:
Erik Hofman 2023-02-20 09:02:21 +01:00
parent 4cb01f0ee7
commit f92170dcb6

View file

@ -13,8 +13,45 @@
<wrap-t>clamp-to-edge</wrap-t>
<internal-format>normalized</internal-format>
</texture>
<rendering-hint>transparent</rendering-hint>
<render-bin>
<bin-number>111</bin-number>
<bin-name>DepthSortedBin</bin-name>
</render-bin>
</parameters>
<!-- Place objects in render bin 111 (frontmost transparent objects).
Remark: <render-bin> parameter is not set in Effects/model-default
to allow adjusting the bin based on material alpha. -->
<technique n="5">
<!-- ALS -->
<pass>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
</pass>
</technique>
<technique n="11">
<!-- Non-ALS shaders -->
<pass>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
</pass>
</technique>
<technique n="13">
<!-- Fallback (no shaders) -->
<pass>
<render-bin>
<bin-number><use>render-bin/bin-number</use></bin-number>
<bin-name><use>render-bin/bin-name</use></bin-name>
</render-bin>
</pass>
</technique>
<technique n="108">
<scheme>hdr-geometry</scheme>
</technique>