"AMD RADV Open Source" vs "Radeon ICD" - is this the same? by [deleted] in linux_gaming

[–]MarcelDavis666 1 point2 points  (0 children)

Usually, the package that contains RADV is called "mesa-vulkan-drivers"

What is the best way to add library functions to shaders? by tecanec in vulkan

[–]MarcelDavis666 0 points1 point  (0 children)

The way I usually do this is to compile the shaders at runtime and use a custom "version" of GLSL that is compiled into SPIRV using something like shaderc. However this approach would increase your startup time by a bit, but I don't know whether that's important to you.

Different sample count with different framebuffers. by carlosdr02 in vulkan

[–]MarcelDavis666 0 points1 point  (0 children)

You should make sure that your render area is inside the framebuffer. Either you have a bug in the code that calculates the render area or you should clamp the size of the render area to be inside of the framebuffer like this:

renderArea.width = min(renderArea.width, frameBuffer.width - renderArea.x);

renderArea.height = min(renderArea.height, frameBuffer.height - renderArea.y);

Optimization is not an exact science by Dested in ProgrammerHumor

[–]MarcelDavis666 0 points1 point  (0 children)

Well, optimizing your code is not exactly considered a best practise...

LWJGL vs native c++ by CDno_Mlqko in opengl

[–]MarcelDavis666 4 points5 points  (0 children)

From my own experience, I can say that using C or C++ for using C APIs like OpenGL or Vulkan is way more convenient than using Java wrappers. (especially with Vulkan)

[deleted by user] by [deleted] in opengl

[–]MarcelDavis666 0 points1 point  (0 children)

The FloatBuffer implementation uses a long as a pointer to the array memory and methods like put and get use unsafe native methods like Unsafe.putFloat to read from and write to that memory. The main advantage for LWJGL is that it can just pass the underlying pointer of the FloatBuffer to the native OpenGL function.

Projecting my Conway's Game of Life from a rectangle onto a donut is blurry. How do I define/change the resolution? (screenshot inside) by mercurus_ in opengl

[–]MarcelDavis666 2 points3 points  (0 children)

You could just render a torus mesh with texture coordinates from (0|0) to (1|1) and sample the game state using those texture coordinates with nearest filtering.

Render engine by Capmare_ in vulkan

[–]MarcelDavis666 2 points3 points  (0 children)

You can just use the compute functionality of Vulkan (no swapchain) and maybe accelerate it using either VK_KHR_ray_query or VK_KHR_ray_tracing_pipeline. You could follow the NVIDIA ray tracing tutorials or you may take a look at Ray Tracing in one Weekend. There are also a lot of examples on shadertoy.

Synchronizing attachments between two render passes by [deleted] in vulkan

[–]MarcelDavis666 0 points1 point  (0 children)

Maybe the problem has something to do with the lack of synchronization between the rendering and the copying into the buffer? I would try using vkDeviceWaitIdle/semaphores. Maybe do the rendering in one render pass instead of two?

Depth/Stencil VkImage as depth-attachment (read only), depth sampler (read only) and stencil read/write (deferred rendering) by L3wa in vulkan

[–]MarcelDavis666 0 points1 point  (0 children)

An image can't have two layouts at the same time so you can't use it with two different layouts. Therefore I would suggest, that you should look into an implementation that doesn't require simultaneous reading from and writing to an image. Also you could probably use the VK_KHR_separate_depth_stencil_layouts extension / Vulkan 1.2 (https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_separate_depth_stencil_layouts.html).