SingularInversions / FaceGenBaseLibrary

A simple cross-platform C++17 library for developing computational 3D graphics applications.
MIT License
46 stars 25 forks source link

Direct3D 11.1 transparency rendering not working on some GPUs #12

Closed ab-cpp closed 4 years ago

ab-cpp commented 4 years ago

For me it worked on RTX 2060 but not on GTX 980 (both are D3D 11.1 capable) Build with Visual Studio, put 'fgbl.exe' in your path and try: > cd ~/data/base > fgbl view mesh Mouth.tri Mouth.tga You will see a mouth with teeth that make use of transparency. Use the mouse and click-drag to rotate. If the model disappears, you have replicated the problem. The rendering code is in ~/source/LibFgWin/FgDirect3D.cpp D3d::renderBackBuffer(...) The part failing is marked 'OIT Pass 1' and 'OIT Pass 2' and is only applied to models with transparency (ie. color map alpha values not all 255).

ab-cpp commented 4 years ago

The shaders are in ~/data/base/shaders/ If you make changes to shaders you can recompile with fxc or use the command 'fgbl d3d' to do the same.

ab-cpp commented 4 years ago

Solved. Update to come.