-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rtx use example #32
Comments
Thanks for asking about ray tracing capabilities in PasVulkan. I am still actively working on integrating this feature. It's a complex task that requires careful implementation to meet the performance and functionality standards I've set for PasVulkan. And I appreciate your question on why SDL is utilized in specific contexts within PasVulkan. Allow me to outline the reasoning behind its selective integration based on the operating system: The integration of SDL is highly contingent on the operating system:
Overall, SDL is integrated into PasVulkan where it offers significant advantages, which is mainly in the Linux environment. But for Windows, PasVulkan takes advantage of the robust native OS APIs, and on Android, it strikes a balance between SDL and native APIs based on what offers the best outcome for performance and control. I hope this clarifies why SDL is used selectively in PasVulkan as cross-OS-API-wrapper, at least for Linux and Android. Should you have further questions, feel free to ask. |
Is no equivalents like ImGUI for Pascal for glfw/vulkan, no SDL? |
At least, PasVulkan has its own quite feature-complete GUI framework, but it's a retained-mode GUI and not an immediate-mode GUI, because I personally don't like the idea behind ImGUIs. In my opinion, retained-mode GUIs (RmGUIs) offer a superior approach to user interface design, particularly due to their robust handling of state and event management. The upfront layout and automatic state retention simplify the development process, making it far more convenient to handle user interactions and dynamic changes within the UI. This built-in efficiency is a significant advantage, enabling the creation of complex, responsive interfaces with less manual overhead. Admittedly, immediate-mode GUIs (ImGUIs) can facilitate quicker development and more straightforward iteration of GUIs, often in a single pass, which can be particularly beneficial during prototyping or for simpler interfaces. However, it's important to weigh these advantages against the potential downsides, such as less efficient rendering and more complex state management, to determine if it's the best approach for a given project. But tastes are different, after all. I myself favor RmGUIs. :-) |
I want to see as soon as possible your rtx approach with RmGUI. |
I've been working on a binding for ImGui in Pascal ^_^ You may find it interesting. |
did you use OpenGL3 or SDL? |
SDL2 is for window creation, and OpenGL3 is a renderer. |
I wish not use SDL. Like in c++ version of ImGUI ;-) |
ImGui has a lot of backends, and SDL is one of them; you can use any of them. |
I dont use Discord. |
ok. what about rtx usage after 1 year of my question. one more question. Is this repo works on mac? |
one more idea is gltf viewer with ray_query pipeline. i interesed with build PBR raytracer |
The current PasVulkan’s Scene3D based gltfviewer has been using ray_query for raytraced shadows for a long time. If a GPU with raytracing capabilities is detected, it enables raytraced shadows; otherwise, it falls back to shadow mapping. PasVulkan’s Scene3D also includes fairly complete raytracing support on the mesh side, including BVH BLAS refitting and rebuilds for animations and dynamic meshes, among other features. However, the code for BVH BLAS compaction (a two-pass method for creating BVH BLAS instances for static meshes that are smaller in VRAM than those built with a one-pass approach) is not yet complete. This feature is primarily for memory optimization and does not impact other functionalities. Additionally, full raytracing/pathtracing support is planned for PasVulkan’s Scene3D in the near future, although this won’t be implemented until after I complete the current PasVulkan-based indie game project. Regarding Vulkan on macOS, it’s a complicated topic. Apple does not support Vulkan natively, so you would need to use the MoltenVK Vulkan-to-Metal wrapper. However, MoltenVK cannot wrap all Vulkan features to Metal because Metal lacks support for some Vulkan features or supports them in a way that makes wrapping challenging or even impossible. |
thank you for impressive work. I go to test it |
Which FPC version you're using? I'm using
and as well
|
I use |
To compile PasVulkan, you need to use either the trunk version of FreePascal (currently 3.3.1) or a recent version of Delphi. This is because the stable versions of FreePascal often lack certain features (which are available in Delphi) or contain bugs that are triggered by the PasVulkan source, especially in areas like generics, inline assembly, code generation, register allocation, and so on. |
I built it with FreePascal 3.3.1 |
The large size is due to debugging symbols, as PasVulkan is a sizable project with a substantial amount of code. Without debugging symbols, the executable should be around 34 MB. Additionally, keep in mind that PasVulkan’s Scene3D requires a significant number of precompiled shader permutations, as they need to be prebuilt in SPIR-V format. So even without debugging symbols, the file size will be at least about 34 MB. |
hm. I pick "strip symbols from executable". |
maybe exe can be smaller? |
big scenes rendered with 4-5 fps on my rtx 3060. |
Unfortunately, the executable can’t be made smaller, as it’s now effectively a comprehensive game engine (currently powering two commercial games in development). The name "gltfviewer" might be misleading here, as it has evolved into a general 3D model viewer that runs on a full game engine. The gltfviewer is intended primarily as a starting-point example project for using the Scene3D stuff. The performance slowdown could be due to raytracing but might also result from running out of video RAM, causing the system to swap in and out, which can be extremely slow—especially if you don’t have ReBAR-ready hardware (CPU, motherboard, or GPU). |
And try CTRL+F8 for dumping the Vulkan-side memory usage, and Shift+F8 for Resource usage and just F8 for CPU+GPU profiler time values (it will get dump into the terminal console window). |
Delphi build works without console and I dont know why |
|
On this screen all checkboxes off in my Lazarus. Only last where strip is on |
Fpc+Lazarus generate code with console by default. Maybe sort of "generate gui app" dont show console |
If gltfviwer is demo for game engine, where I can read about this engine? And maybe cheatsheet of api? |
|
When you plan to implement fully path tracing support? I interested on this feature |
please don't take it as impudence, but could you please give an example of path tracing with accumulation and use of tonemapper? |
I have 2 questions.
thank you!
The text was updated successfully, but these errors were encountered: