nmfisher / flutter_filament

3D rendering layer for Flutter/Filament
Other
44 stars 7 forks source link

Windows GPU texture support #6

Open nmfisher opened 7 months ago

nmfisher commented 7 months ago

If you have a keen eye you'll see that on Windows we are reading into/copying a pixel buffer on every frame, which is not ideal.

I did try implementing support for direct GPU texture passthrough (via ANGLE/D3D). I left a preprocessor define in windows/CMakeLists.txt (USE_ANGLE) to switch between the two but there have been some subsequent changes that means that is probably broken. This also require a custom build of Filament on Windows (to build against EGL/GLES rather than WGL).

It "worked", but with some clear problems with rendering (colours weren't right, artifacts, etc). There were some console logs around rewriting shaders so it's possible that the stock Filament shaders aren't translated correctly by ANGLE.

This should definitely be the objective on Windows.