Questions tagged [vulkan]

For questions about the Vulkan graphics/compute API.

Filter by
Sorted by
Tagged with
0 votes
0 answers
105 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 ...
shawn_halayka's user avatar
0 votes
1 answer
40 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 ...
Tare's user avatar
  • 1,501
0 votes
2 answers
50 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 ...
KTM's user avatar
  • 1
1 vote
1 answer
47 views

Is it possible to read arbitrary data at arbitrary array offset in glsl?

TL;DR In a Vulkan / GLSL 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, one might ...
Tare's user avatar
  • 1,501
0 votes
0 answers
187 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 ...
shawn_halayka's user avatar
1 vote
1 answer
57 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)....
Sienna's user avatar
  • 111
0 votes
0 answers
40 views

Vulkan: Compressed image formats and mipmapping

I am currently grappling with the computation of mipmaps for block compressed formats (BC7) in Vulkan. The limitation with these formats is that the size of the block compressed texture needs to be a ...
wilson's user avatar
  • 1
0 votes
1 answer
36 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-...
Tare's user avatar
  • 1,501
0 votes
2 answers
151 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 <...
Nick's user avatar
  • 11
1 vote
0 answers
78 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 ...
The Floating Brain's user avatar
0 votes
1 answer
85 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 ...
InvalidOverhead's user avatar
1 vote
0 answers
54 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 ...
amberbrew's user avatar
2 votes
1 answer
217 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 ...
HelloGoodbye's user avatar
0 votes
1 answer
266 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 ...
HelloGoodbye's user avatar
0 votes
2 answers
104 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 ...
Joseph Vargas's user avatar
0 votes
2 answers
86 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 ...
Vectorizer's user avatar
0 votes
1 answer
66 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. ...
sak's user avatar
  • 159
1 vote
1 answer
211 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 ...
Daryl's user avatar
  • 113
1 vote
1 answer
103 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 ...
Vectorizer's user avatar
0 votes
0 answers
85 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 ...
Lilylilyren's user avatar
3 votes
0 answers
118 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 ...
Carsten's user avatar
  • 131
1 vote
1 answer
162 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 ...
Lilylilyren's user avatar
0 votes
0 answers
81 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 ...
Lilylilyren's user avatar
0 votes
1 answer
320 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!
Lily's user avatar
  • 31
0 votes
1 answer
116 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 ...
Lily's user avatar
  • 31
1 vote
0 answers
293 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: ...
sak's user avatar
  • 159
1 vote
1 answer
519 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) ...
sak's user avatar
  • 159
1 vote
1 answer
195 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 ...
sak's user avatar
  • 159
0 votes
1 answer
522 views

rendering in two windows

I want to render on two windows. What are some stuffs that I should share, and what stuffs should I separate? I have a rendering program in Vulkan and want to add a window to it. It seems that I need ...
Lily's user avatar
  • 31
1 vote
1 answer
237 views

How Anisotropic filtering works

I would like to understand how anisotripic filtering works in gpu. Specifically what is the minimum state in which the texture needs to be in for anisotropic filtering to work. by state of the texture ...
VersesDev's user avatar
  • 119
1 vote
2 answers
289 views

what is the output from rasterizer

what exactly does the rasterizer outputs as per my knowlage it outputs primitives rasterized as fragments which seems correct as the next step in vulkan/opengl is fragment shader but dx confuses me ...
VersesDev's user avatar
  • 119
0 votes
0 answers
214 views

Vulkan abstraction similar to OpenGL?

Because OpenGL is deprecating, I was wondering where to position myself to keep on learning graphics programming in the years to come on the same level of abstraction as OpenGL ? I don't want to go ...
user1511956's user avatar
0 votes
1 answer
138 views

Text rendering - weird outline when zoomed

I'm writing a simple text editor using Vulkan for rendering, and I'm seeing some strange outline around the rendered letters if I take a screenshot of the text and zoom in, which bothers me because I ...
Ivan Ivanov's user avatar
0 votes
1 answer
1k views

A lot of pipelines on Vulkan for each render pass, what could go wrong?

I would like to represent creation for each 2D shape or bitmap effect as a pipeline. The only purpose of this to modularize algorithms because extendibility is a big deal for current project. However, ...
Thor-x86_128's user avatar
2 votes
2 answers
1k views

vulkan perspective matrix vs opengl perspective matrix

Hi I have a slight confusion in using the opengl perspective matrix in vulkan. glm's perspective matrix works directly in vulkan just by multiplying the "[1,1 term by -1 but when I compared the ...
VersesDev's user avatar
  • 119
1 vote
1 answer
842 views

Is drawing Bezier curve with scanline algorithm possible with Vulkan?

As an information, Vulkan is a low-level abstraction layer thru modern GPU. It allows programmers to program the GPU and assemble rendering pipeline. On that pipeline, there are modules of program ...
Thor-x86_128's user avatar
2 votes
1 answer
378 views

How can I implement subpixel antialiasing for font rasterization in Vulkan?

As a hobby project I am creating text rendering application that renders text directly from glyph outlines. Currently I am trying to find info on how to implement subpixel antialiasing. I know that ...
griips21's user avatar
0 votes
1 answer
564 views

Vulkan Queue (Family), Command (pool) and Hardware usage

I have some questions about the GPU usage of Queues / Queue families, command buffer / pool. I am reading the Book: ...
Thomas's user avatar
  • 1,027
1 vote
0 answers
119 views

Time Interval Ray Tracing performance

I found a very nice paper regarding Time Interval Ray Tracing for Motion Blur published in 2017. That was before RTX GPUs were on the market. I have a few questions about an optimal implementation and ...
Thomas's user avatar
  • 1,027
1 vote
1 answer
225 views

Mesh-Shader and layered rendering

In the usual pipeline (vertex, tessellation, geometry and fragment shaders) the geometry can be deformed and in the geometry shader it is possible to copy the generated and deformed geometry in order ...
Thomas's user avatar
  • 1,027
0 votes
1 answer
90 views

Level of detail passed from vertex shader to fragment shader

I am looking at a sample code from a respected source and the mipmap level-of-detail parameter (float) is passed to the vertex shader as a uniform which then passes to the fragment shader without ...
Vectorizer's user avatar
0 votes
0 answers
45 views

Offsetting value in shader causes unexpected/wrong logic

Let me explain what I am doing. I am trying to reduce the memory footprint of a voxel based algorithm by storing the voxel data as a hash map in an SSBO, as opposed to a 3D image. I am visualizing the ...
Makogan's user avatar
  • 1,656
0 votes
1 answer
82 views

DirectX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan?

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.
Cerberus's user avatar
1 vote
2 answers
556 views

Is there an efficient way to achieve color blending in compute shaders?

What I want is a function like imageStore, but instead of replacing a value - applying a blend operation to it, e.g. addition. It is not possible to do something ...
user369070's user avatar
1 vote
1 answer
65 views

Mat4 that is written to a storage buffer in a compute shader has an altered value when read back

I am attempting to use a compute shader to calculate joint transforms for animations. I use a loop to calculate the global joint transforms from the local transforms. Relevant code below: ...
xyz's user avatar
  • 33
0 votes
2 answers
1k views

Does Vulkan have the equivalent of OpenGL's separable shader program and pipeline?

If you have a shader pipeline in OpenGL that goes something like the following: ...
Zebrafish's user avatar
  • 131
2 votes
1 answer
107 views

How do fragment shader invocations subgroups map onto triangles?

Should I expect that every invocation/fragment within a subgroup, when using something like subgroupBroadcast(), will belong to the same triangle?
user369070's user avatar
1 vote
1 answer
1k views

GLSL Compute Shader Setting "shared" memory buffer size

Is it possible to set the size of the shared memory of a compute shader workgroup from the host code? There is a way to do this in CUDA and I am suspecting that, since there is an GLSL extension to ...
Vectorizer's user avatar
0 votes
1 answer
251 views

imageLoad() behavior for non-existent texel

Is there a way to influence the behavior of imageLoad() for accessing an image2D or uimage2D ...
Vectorizer's user avatar
1 vote
1 answer
868 views

Vulkan clear color is wrong

I am following https://vulkan-tutorial.com/Introduction to get myself familiar with the Vulkan API. I have gotten to the point where my application is able to draw a triangle. But for some reason the ...
Eric's user avatar
  • 111