Suggestions and improvements after attempting to integrate it into my project: #7617
aguerrieri82
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, congratulations on the huge work. I've started to make my own XR game engine. Long story short, I've tried everything out there, but nothing fits the needs with a decent iteration time. Since I'm not going to render on windows/swapchains and I need deeper control of the underlying backend, I've found some issues (not everything is related to my project) that I'm trying to synthesize here. If this is not the right place, I will open an issue for every point made here.
Android Build
🚨 Android build fails on Windows since it tries to invoke a bash script to merge some .a files into a single archive. Please provide the Windows version of the script or update your documentation. I've spent hours on this, then fell back to WSL.
Please provide the library files ready to download, just like for the Windows platform. Hardly anybody will use the Java/JNI interface, since it likely needs to be multi-platform, and people prefer using native libraries.
OpenGL (Windows)
GetDC
on the same Windows handle, that will be a new one and incompatible. So.sharedContext
must point to a struct like this:Also, we must publicly expose both values from the
PlatformWGL
class if we want to delegate Filament to create the context and share it afterward.wglMakeCurrent(whdc, NULL)
), but I cannot access to it. I've made two virtual methods onPlatform
.that are called inside
Engine::execute
in order to handle this case. WhenonPreExecute
returns false, the command queue is not processed. Processing the queue while the context is owned by another thread will cause hundreds of assertion failures.Vulkan
static ExtensionSet VulkanPlatform::getRequiredInstanceExtensions()
).VulkanDriver::importTextureR
is not implemented, and no warning/exception is given. I spent hours trying to understand whatTexture::Builder::import
does. The implementation was quite simple; please integrate it into the main branch.Memory managment on vertex/index buffers and textures
Texture::setImage
orIndexBuffer::setBuffer
, etc., are not immediately committed, but I need to free the memory as soon as the GPU has loaded the data. How can I do that? I can callEngine::flushAndWait
, but I'm not 100% sure that Filament won't need that buffer anymore. Can you please add a flag to such buffers to opt-in for "release the memory when you are done"?Off-screen rendering
beginFrame
always requires a swapchain. If I'm rendering off-screen on a render target, I don't need one. I've been successful in avoiding those calls by simply invokingrenderStandaloneView
, but I don't know if it's a 'hack' or if it's okay.endFrame
will cause a call toSwapBuffers
onPlatformWGL
, waiting for the v-sync. Please, make a public method for each platform to disable the v-sync (a VR device has its synchronization mechanism, and I need to render on the provided texture as soon as the device requests it).Surface orientation
OrientationBuilderImpl::buildWithUvs
was not implemented with a stride. Here is my implementation:Poor performance
On the Meta Quest 3 device (Snapdragon XR2 Gen 2 - Adreno (TM) 740), I've experienced very poor performance with both OpenGL and Vulkan in stereo rendering (two views bound to two different frame buffers). By poor, I mean achieving only 40 fps while rendering a single cube with a color-only shader (no post-processing, no shadows, no MSAA, no IBL, just one sunlight). Maybe I'm doing something wrong or the V-Sync is kicking in. In my render loop, I'm only updating the world matrix and the camera view/proj; the scene remains unchanged once created.
With my self-made OpenGL ES rendering engine / shader system, for a not too complex scene, I was easily able to maintain 72fps, which is the minimum required in VR to avoid motion sickness.
Here my code
Minor
ShadowMap::SceneInfo::SceneInfo
, the following assert is 99% false due to floating-point approximation. Add an epsilon or remove the assert (in debug, kicks in every frame).That's it for now, thanks :)
Beta Was this translation helpful? Give feedback.
All reactions