-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add OpenGL or Vulkan renderer #14
Comments
@DileSoft - linux |
Если ещё получится прикрутить PBR и PBM, я подготовлю новые текстуры, с картами нормалей и т.д. (под это придется модели заново развернуть и переэкспортировать в игру). |
Может пригодиться https://github.com/ValveSoftware/ToGL |
Проверил dxvk-native на примере приложения directx9, работает отлично. Требует для работы толко SDL2, таким образом связка SDL2 + Dx9 + dxvk должна работать на линуксе нативно. Может позже прикреплю пример. |
Что хотелось бы получить в будущем:
|
Although there is dxvk used for rendering under linux now, it would be nice to have native OpenGL or Vulkan render, or at least use wine opengl based implementation for dx9. DXVK currently can be CPU-bound on old CPUs, especially if particle rate is high. |
+1 also it would be interesting to take a look into graphics API agnostic wrapper like bgfx as @q4a suggested or look similar wrappers like wgpu that is available in Rust. On side note it seems that Render module should have a abstract interface between D3D specific code and game code (cInterfaceRenderDevice), but some D3D stuff has leaked into abstract API probably due to not needing actual abstraction and limited time. This should be taken into account when adding new renderer or replacing D3D renderer. |
Came here from Vangers Developers telegram.
Note that neither bgfx or wgpu have raytracing support. In wgpu we'd definitely want that, but nobody is working on it now, and it's a huge piece of work. So if that's your requirement, then going for Vulkan/DX12 straight would be a must. Rusty Vangers do raytracing in pixel shaders on wgpu. If Perimeter terrain representation format is similar, we could collaborate on that approach between communities. |
Thanks for detailed information and differences between both wrappers, then for now it seems that integrating bgfx is a more reasonable choice in order to make game more compatible with non Win32 platforms with less amount of time and required changes in process. Plus seems to support more old-ish platforms/backends such as GLES2.0 and DX9. wgpu looks like a good option as alternate renderer in future after bgfx when we want more goodies like some mentioned in this issue and more advanced graphics pipeline like PBR, for now raytracing isn't a must have and actual implementation might pose some challenges. I haven't taken a deep dive in rendering of game but seems to use the standard dx9 features, shaders don't seem to do anything unusual/exotic, terrain seems to be rendered in tileset way composed by small rectangular tiles that act as vertex planes (each tile vertexes seem to be updated when height changes are noticeable, otherwise just texture is updated), this can be observed when enabling some debug rendering modes like wireframe on Debug builds: For the terrain part it seems that most terrain related code is at https://github.com/KD-lab-Open-Source/Perimeter/tree/cmake/Source/Terra which some parts seem to come from previous games from the studio (Vangers and Samogonki) but I'm not sure the degree of similarities and what game specific changes has been done to data representation/storage, other game links: Maybe @caiiiycuk has more experience with surmap related stuff? |
The ideal place to be is have a plugin rendering architecture like Vangers recently got in KranX/Vangers#517. This way you could have bgfx, wgpu, and a pure Vulkan raytracing renderers to play with interchangeably. But this of course requires more time/energy, and not necessarily the best thing for you right now. |
Mmm seems like we may have some starting point at https://github.com/IonAgorria/Perimeter/blob/cmake/Source/Render/inc/IRenderDevice.h if we isolate the D3D specifics and remove some unnecessary stuff from render API, that interface is inherited in https://github.com/KD-lab-Open-Source/Perimeter/blob/cmake/Source/Render/D3D/RenderDevice.h which is then finally implemented in https://github.com/KD-lab-Open-Source/Perimeter/blob/cmake/Source/Render/D3D/D3DRender.h |
Create separate to direct3d renderer based on modern api (vulkan or opengl)
The text was updated successfully, but these errors were encountered: