Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

139 Neutral

1 Follower

About DiligentDev

  • Rank

Personal Information


  • Twitter
  • Github

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Diligent Engine now supports Vulkan on Linux! Check it out https://github.com/DiligentGraphics/DiligentEngine
  2. The error in fact means exactly what it says: you cannot use the same command list to record commands that use more than one swap chain buffer. To fix the error, you need to submit the command list and reset it before using it for the next buffer in the swap chain. As for the render targets, using the same back buffer in every frame is incorrect. You need to query current back buffer index from the swap chain every time after you present.
  3. Not sure what exactly you mean by "doing 1/w", but in both HLSL and GLSL, you do not need do divide your vertex shader output by w. In all APIs your shader output is in homogeneous 4D space, the projection to w=1 plane is done by the rasterizer after culling, clipping and other steps. Be aware though that while D3D and Vulkan use normalized device Z coordinate range [0, 1], OpenGL by default uses [-1, +1] (unless you use extensions to fix this). This affects how z from NDC is transformed to depth and defines how you should set up your projection matrix.
  4. Check out new tutorial - Resource Updates. This tutorial demonstrated different ways to update buffers and textures in Diligent Engine and explains important internal details and performance implications related to each method.
  5. Added another tutorial - Data Streaming. This tutorial shows dynamic buffer mapping strategy using MAP_FLAG_DISCARD and MAP_FLAG_DO_NOT_SYNCHRONIZE flags to efficiently stream varying amounts of data to GPU and render dynamic polygons.
  6. Diligent Engine's Vulkan back-end is now 100% complete! It was quite a path from the first triangle to all other features, but the results are very encouraging. In Asteroids benchmark, single-threaded Vulkan mode is faster than native Ditrect3D11 implementation while multithreaded is on par with Direct3D12.
  7. So for reference here is the solution that seems to work for me. 1. First of all, SPIRV code was missing binding and descriptor set decorations because I was not using glslang properly. I called Shader.setAutoMapBindings(true) and was expecting the compiler to assign decorations automatically. In reality this call only tells the compiler that decorations will be explicitly assigned later by the app. The actual assignment is done by Program.mapIO() function. Since I do not care about values at SPIRV compilation stage, but only need decorations to be present in the byte code, I simply return 0 for all resources. 2. SPIRV-Cross has get_binary_offset_for_decoration() method that returns offset in the original bytecode to the specific decoration of a certain resource. I use this method to find and modify decorations in the compiled SPIRV.
  8. DiligentDev

    HLSL Geometry Shader not emitting triangles?

    One suggestion: from what I see you do not need geometry shader at all. Generally, GShader is used when you need to access all vertices of your primitive (to generate face normal, for instance), to route triangles to different render target slices, to dynamically generate triangles (not recommended). If you want to render multiple quads, you can use instancing instead, with your VShader emitting vertex positions based on VertexId and reading quad data from constant buffer based on InsatnceId or a vertex buffer that uses per instance frequency.
  9. DiligentDev

    Projecting a texture

    Most likely something with the near clip plane distance of the projection camera. Try reducing it and see if it gets you what you want.
  10. @GuyWithBeard Thank you for the suggestion! My problem is little bit different though as I want to be able to work with SPIRV directly. As a gross workaround I can use SPIRV-Cross to emit GLSL after assigning bindings and then use glslang to compile it back to SPIRV. This is obviously far from ideal solution...
  11. Hello everyone! For my engine, I want to be able to automatically generate pipeline layouts based on shader resources. That works perfectly well in D3D12 as shader resources are not required to specify descriptor tables, so I use reflection system and map different shader registers to tables as I need. In Vulkan, however, looks like descriptor sets must be specified in both SPIRV bytecode and when creating pipeline layout (why is that?). So it looks like I will have to mess around with the bytecode to tweak bindings and descriptor sets. I looked at SPIRV-cross but it seems like it can't emit SPIRV (funny enough). I also use glslang to compile GLSL to SPIRV and for some reason, binding decoration is only present for these resources that I explicitly defined. Does anybody know if there is a tool to change bindings in SPIRV bytecode?
  12. DiligentDev

    DirectX - Vulkan clip space

    I am now facing the exact same problem. I have just tried viewport height negating with VK_KHR_maintenance1 extension and it seems to work fine at least for the main framebuffer. It also works in cases when shaders do not rely on projection matrix, so that my test triangle looks identical in all 4 support APIs.
  13. After about one month of work and with the help of few thousand lines of new code, Diligent Engine has rendered its first (upside down for now) triangle with Vulkan back-end!
  14. I will add WebGL support to my TODO list, my next step though is gonna be Vulkan backend.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!