Questions tagged [vulkan]
For questions about the Vulkan graphics/compute API.
130
questions
0
votes
1
answer
39
views
What API is exposed by the graphics card's driver to the OS or the apps?
When graphics card vendors like Nvidia / AMD write drivers for their cards, what API is exposed for the OS. Is it APIs like OpenGL / Vulkan / DirectX? If so does the apps that can consume such APIs, ...
0
votes
1
answer
80
views
How to orbit rotate a camera from a C++ program?
I made C++ rendering application that use one camera. The camera has 3 important members: A position(m_position), an horizontal angle(m_hAngle) and a vertical angle(m_vAngle)
The application currently ...
0
votes
1
answer
40
views
How to do asynchronous Vulkan / OpenGL interop rendering?
I have an interop system where Vulkan renders a shared image to a rendertarget which then gets presented to a surface (i.e. visible in a window).
OpenGL renders to the shared image, but does so in a ...
0
votes
0
answers
18
views
gl_instanceindex takes location of my vertex input(so, it invalidate smy input for vertex)
Have problem with instanced drawing. gl_instanceindex takes input location of one of my vertex attributes. Why is it happening?
shader inputs:
...
0
votes
0
answers
24
views
HealPix: Different results when comparing C++ and Vulkan
I have converted the algorithm for calculating the HealPix value from Lat/Lon values from C++ to GLSL. The result is saved in a BMP image and looks correct. Both algorithms (C++ and GLSL) use the same ...
0
votes
1
answer
38
views
Vulkan+glm orthographic projection clipping unexpectedly
I am following along https://vulkan-tutorial.com/ and just finished the chapter on Uniform Buffers. I tried to change the projection matrix to see the outcome, however, when I change the zFar value in ...
0
votes
0
answers
23
views
In Vulkan - OpenGL interop, what tiling would an image need?
I have set up a program that does Vulkan - OpenGL interop. I heavily borrowed from the Vulkan Sample.
The idea is: Vulkan creates an image and semaphores. OpenGL will render to the image and Vulkan ...
0
votes
1
answer
20
views
Set usage efficiensy and problems in VUlkan
I am learning Vulkan, and through the process of developing a renderer by Vulkan guide(extra-engine sample), I got questioned whether I should use different sets for uniform buffers (camera data/...
1
vote
1
answer
52
views
How do the vulkan fences behave on the GPU?
I went through a lot of Vulkan tutorials and each of them has talked about fences, which is good, but each of them does not clearly tell what exectly happen on GPU. It is so frustrating trying to ...
0
votes
0
answers
22
views
Vulkan vkCmdCopyBuffer with Semaphores
I am trying to copy data from one buffer to another.
I have two VkSemaphores (each buffer has one) that should be checked before the copying process starts. And which should be signaled when the copy ...
0
votes
1
answer
36
views
Vulkan synchronization stageBuffer
I am writing a program that uses a transfer queue and a compute queue. As the names suggest, the transfer queue loads data from the CPU to the GPU and from the GPU to the CPU and the compute queue ...
0
votes
0
answers
44
views
Ocean screen grid projection and animation
I am trying to port the Bruneton Ocean demo to Vulkan and I am having a bit of trouble with the coordinate system. I am using the matrices from the original code but I am not sure what this is doing:
<...
1
vote
1
answer
173
views
How to include SPIRV in a CMake project
SPIRV Cross
How do I include this in my project
I added this to my packages folder
...
0
votes
1
answer
67
views
Getting linking error while testing to add vulkan shaderc in my project
CMakeLists.txt
find_package(Vulkan REQUIRED)
target_link_libraries(${PROJECT_NAME} INTERFACE Vulkan::Vulkan)
in my shader.cpp
...
0
votes
1
answer
203
views
Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support
Good people of the graphics SO community, I am new to Graphics programming or GPU programming in general but I have been a game dev enthusiast for over 4-5 years. I started learning about Graphics ...
0
votes
1
answer
137
views
Forward path tracing versus backward path tracing. How may I achieve realistic shading in forward path tracing?
I have a forward path tracer. Essentially, it looks flat:
This is the backward path tracer in comparison:
My question is: How do I get pseudorandom lighting like with the backward path tracer, when ...
0
votes
0
answers
38
views
Is there a way to force a closest hit shader?
I want to add a debug feature to my ray tracer (runs in both Vulkan and OptiX). For that, I'd like to switch all objects to use a specific closest hit shader. Can I do this? I have only found the ...
0
votes
0
answers
29
views
How to use linear color attachment with NV extension in vulkan?
I have an OptiX ray tracer and a Vulkan renderer. In Vulkan, so far I have only been displaying the image the ray tracer created.
Now I want to add rendering in the Vulkan renderer.
For the interop, I ...
1
vote
0
answers
68
views
Vulkan (Hardware) Path Tracing Formulation
I've been implementing a path tracer in Vulkan using the VK_ray_tracing extension and am a bit confused on how to set up the pipeline. Currently I've been following the style of the Reference Path ...
0
votes
1
answer
94
views
Vulkan memcpy from image works, but memcpy to image not working
Using Vulkan, I am reading from an image to a vector of unsigned char. It works great.
...
0
votes
0
answers
354
views
How can I use Vulkan on windows with an incompatible processor?
I already have experience with Vulkan on my home computer, however I live in a dorm with a kinda old laptop.
The processor, an Intel(R) HD 4600 Graphics, is incompatible on windows with Vulkan.
I've ...
1
vote
0
answers
180
views
What is the difference between Uniform/Storage Buffer and Hitgroup Record data buffer?
I have a vulkan ray tracer in which I uploaded my vertices as a single buffer (for all meshes in the scene) as a storage buffer. I have one closest hit shader per way-of-calculating-lighting (e.g. one ...
0
votes
0
answers
84
views
How to use unbound descriptor range properly in descriptor tables
I am trying to use 2 "D3D12_DESCRIPTOR_RANGE" in a root descriptor table,defined as follows:
...
0
votes
0
answers
131
views
Path tracer -- How to debug erroneous behaviour?
Edit: I've pinpointed the problem. If I change:
local_colour *= (rayPayload.color.r*mask.r + rayPayload.color.g*mask.g + rayPayload.color.b*mask.b);
into
...
0
votes
1
answer
203
views
How are strings for debugPrintfEXT handled in glsl?
Glsl does not support string / char data types, but obviously debugPrintfEXT works and takes some form of string. How are these handled in glsl?
Ideally I would ...
1
vote
2
answers
210
views
Can Vulkan Queue Families be separate but identical?
I was trying to find examples of GPUs with more than 3 queue families to see what edge cases programmatic selection of compute and transfer queues might encounter.
This card has six. Two of the extra ...
1
vote
1
answer
194
views
Is it possible to read arbitrary data at arbitrary array offset in glsl?
TL;DR
In a Vulkan / GLSL ray tracing program, I have several shader files, all accessing the same material buffer of arbitrary data. All materials have an arbitrary layout, e.g. one might be a float, ...
0
votes
0
answers
248
views
Vulkan backward-only path tracer with caustics
TL;DR -- who has discovered, in the past, a backward-only path tracer that generates caustics not needing extra convergence of any kind? I'm collecting similar algorithms, in order to fully understand ...
1
vote
1
answer
125
views
Vulkan Syscalls
I'm working on educating myself more about computer graphics, and the more I learn and play with the technology, the more I get frustrated by the dependencies on C++ (even though I know why it exists)....
0
votes
1
answer
95
views
How to set Vulkan Validation Layer filter via the vk_layer_settings.txt?
I have just activated the Vulkan Best Practices Validation and due to that I get the following warning:
Validation Layer(WARNING): Validation Warning: [ UNASSIGNED-BestPractices-vkCreateInstance-...
0
votes
2
answers
225
views
Relative coordinates -- cumulative sum
I have a vertex shader happily producing all the vertices I want for a 2D plot. Now I want to also render a plot of the same data, but each point relative to the previous one, like SVG Paths using <...
2
votes
0
answers
201
views
Does WebGPU Have Significant Feature/Functionality Gaps As Compared to Vulkan/DirectX12/Metal?
A friend and I are considering using webgpu native (more specifically C++ bindings) for a project. We were wondering, since WebGPU likely runs on top of Vulkan XOR DirectX12 XOR Metal at any given ...
1
vote
1
answer
136
views
Why do texture samplers seem to bleed into other instances when rendering multiple instances of the same mesh with differing textures
I originally asked this question on the gamdev stack exchange but was told by a friend I would be better served here.
Original Question
So I will start off by laying out the relevant structure of my ...
1
vote
0
answers
73
views
How does changes in vertex data work?
I have been learning computer graphics and for some time and can't seem to wrap my head around one concept. How to handle vertex data changes?
Ex. 1. I have a text rendering on a screen. And up on ...
2
votes
1
answer
579
views
How does Unreal Engine 5's Lumen (most likely) implement reflections?
In this YouTube video, the creator mentions that reflections in Unreal Engine 5's Lumen "work by tracing the path of light as it bounces off of surfaces in the game world." Does this mean ...
0
votes
1
answer
584
views
Raytracing in OpenGL or Vulkan?
I was looking at this glass ball rendering with an image inside of it (zoom out to see the glass ball), and noticed that it looks like they simulate the refraction of light as it crosses from inside ...
0
votes
2
answers
301
views
Custom LookAt and Perspective Matrix functions not rendering in Vulkan
I am trying to create a custom math library for a renderer. The renderer works when using glm but for educational purposes as well as for the sake of having a custom library to support multiple ...
0
votes
2
answers
152
views
Porting from DXR/HLSL to Vulkan Ray Tracing Extension/GLSL
I am working on the port of a demo from DXR to Vulkan Ray Tracing extension using GLSL.
In DXR/HLSL space, there are RayTMin() and RayTCurrent() functions to retrieve the starting and the current end ...
1
vote
1
answer
160
views
Is there a good rule of thumb for the optimal / maximum number of instances to draw in a single call?
So let's say I want to draw a lot of textured quads to the framebuffer.
In each shader invocation, I will bind an array of indicies, an array of positions, and an array of textures to index into. ...
1
vote
1
answer
472
views
How to do frustum culling with draw call bundling?
If I'm understanding things correctly (please correct me if I'm wrong):
All modern graphics APIs (vulkan, dx12, metal, webgpu) provide ways to bundle and replay draw calls. The bundle includes which ...
1
vote
1
answer
140
views
Vulkan Ray Tracing analogue of Optix's OPTIX_BUILD_INPUT_TYPE_CURVES
Optix has OPTIX_BUILD_INPUT_TYPE_CURVES to model splines. The SDK comes with an example named optixHair.
I could not find something like this under Vulkan RayTracing Extension, how could one implement ...
0
votes
0
answers
125
views
adding a compute shader after a pipeline
I am writing a program to add a compute shader after rendering my image, and add a graphics pipeline after the compute shader to present the final image.
I have a question though. How should I set the ...
4
votes
1
answer
195
views
What causes buffer access to be significantly slower in DXIL than SPIR-V?
I am currently experimenting with unbounded descriptor arrays and ultimately want to use bindless descriptors. I wrote a test application, that draws 100.000 simple object instances, where the ...
1
vote
1
answer
287
views
bilateral filter in vulkan
I am supposed to use bilateral filter to denoise my image rendered with Vulkan. I wonder how I should implement the method. Should I add the rendered image to another frag shader as a texture and ...
0
votes
0
answers
97
views
multithread rendering performance
I am simulating multiple users rendering with my program on my computer with multiple threads. I wonder why my fps counter tells me that the performance on all threads is the same, regardless of the ...
0
votes
1
answer
727
views
exporting the final image from Vulkan
I wish to render an image with my vulkan program and save it to local path. What's a good way to do this or has anyone done it before?
Thanks!
0
votes
1
answer
247
views
What are some tools to test performance of a Vulkan based game?
I am developing Vulkan games. It is still a basic rendering program with some cornel boxed data. Apart from testing hairs, calculating fps, what are some tools to apply to test the performance of such ...
1
vote
0
answers
509
views
Problem when passing a readonly image2D to a function
I would like to declare a function which reads from an image2D and modifies the output.
My shader is written like so:
...
2
votes
1
answer
1k
views
Is there a cost to querying a texture size inside a GLSL shader?
So I need to have a texture size for my compute shader. I found this function in GLSL to query this inside the shader:
ivec2 textureSize = imageSize(outputImage)
...
1
vote
1
answer
387
views
Having trouble understanding advection from GPU gems fluid dynamics example
So I am trying to implement a fluid simulation, as described in Chapter 38 of GPU Gems.
I am also drawing heavily from the excellent implementation by Pavel.
Where I'm getting a bit stuck is with ...