Questions tagged [vulkan]

For questions about the Vulkan graphics/compute API.

Filter by
Sorted by
Tagged with
0 votes
0 answers
28 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: ...
user avatar
  • 147
1 vote
1 answer
30 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) ...
user avatar
  • 147
0 votes
0 answers
18 views

What's the best practice for dispatching a compute shader to work on just the border pixels of an image?

I'm trying to implement a fluid simulation as described in GPU gems chapter 38 as a way to learn compute shaders and Vulkan. So I am currently trying to implement the boundary program described in ...
user avatar
  • 147
0 votes
0 answers
26 views

Vulkan render loop - image presentation problem

I'm working on a game whose rendering workload is very low, so I implemented a very simple render loop in Vulkan, which submits one command buffer every frame, waits until the GPU is done with the ...
user avatar
1 vote
1 answer
85 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 ...
user avatar
  • 147
0 votes
1 answer
46 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 ...
user avatar
  • 23
0 votes
0 answers
10 views

showing rendered image from mobaxterm with a server edition hardware

I am currently testing my Vulkan code on mobaxterm. It couldn't show any images, which I was told that we have a server edition of some hardware, and mobaxterm has its own presentation mechanic. I ...
user avatar
  • 23
0 votes
1 answer
55 views

x86 to ARM, adapting my Vulkan program

I developed my program on x64 platform, but now wish to adapt it to ARM architecture. Does anyone has some good resources or advice about the different between the two? Are there major changes to the ...
user avatar
  • 23
1 vote
1 answer
97 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 ...
user avatar
1 vote
2 answers
63 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 ...
user avatar
0 votes
0 answers
65 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 ...
user avatar
0 votes
1 answer
51 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 ...
user avatar
0 votes
1 answer
174 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, ...
user avatar
2 votes
1 answer
203 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 ...
user avatar
0 votes
1 answer
249 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 ...
user avatar
1 vote
1 answer
105 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 ...
user avatar
0 votes
1 answer
154 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: ...
user avatar
  • 489
1 vote
0 answers
90 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 ...
user avatar
  • 489
1 vote
1 answer
114 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 ...
user avatar
  • 489
0 votes
1 answer
69 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 ...
user avatar
0 votes
0 answers
38 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 ...
user avatar
  • 1,447
0 votes
1 answer
62 views

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

Is there any directX FVF(Flexible Vertex Format ) equivalent in OpenGL/Vulkan.
user avatar
1 vote
2 answers
255 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 ...
user avatar
1 vote
1 answer
45 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: ...
user avatar
  • 21
0 votes
2 answers
490 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: ...
user avatar
  • 131
2 votes
1 answer
60 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?
user avatar
1 vote
1 answer
839 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 ...
user avatar
0 votes
1 answer
94 views

imageLoad() behavior for non-existent texel

Is there a way to influence the behavior of imageLoad() for accessing an image2D or uimage2D ...
user avatar
0 votes
1 answer
410 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 ...
user avatar
  • 101
0 votes
1 answer
87 views

Operations in the Rendering Pipeline

I have a few short question regarding operations happening in the rendering pipeline (OpenGL, Vulkan, I'd expect for all questions to have similar answers for these two frameworks while DirectX might ...
user avatar
  • 67
2 votes
1 answer
368 views

Layer rendering in Vulkan

I am writing a Vulkan video manipulation engine which has the following layers: Foreground (2D) Scene (3D) Background (2D) Note that each layer may have multiple objects, some of which may be ...
user avatar
2 votes
1 answer
1k views

What are the use cases for multiple render passes?

From what I understand of Vulkan, we have a render pass with its associated image resources and subpasses, and each subpass accesses those resources and may synchronise with previous subpasses to ...
user avatar
  • 165
1 vote
0 answers
197 views

How could I remove this colour interpolation artefact across a quad?

I've been reading up on a vulkan tutorial online, here: https://vulkan-tutorial.com. This question should apply to any 3D rendering API however. In this lesson https://vulkan-tutorial.com/...
user avatar
  • 165
1 vote
0 answers
151 views

OpenGL/D3D11 offscreen render multiple buffering

Recently I've been looking at Vulkan, and one thing that I noticed is that the application is responsible for choosing which buffer to render to in the case of multiple buffering. This got me thinking:...
user avatar
2 votes
1 answer
334 views

Do you have to group and optimize your draw and shader calls in Vulkan?

This is in reference and contrast to the discipline (or more or less requirement) of opengl to group draws that use the same materials together, to minimize making many draw calls or many switch ...
user avatar
  • 63
-1 votes
1 answer
120 views

When do people need to work directly with a graphical API (eg: Direct3D) instead of using already made software?

I had this doubt in my head for several months and have been unable to find an answer anywhere on internet. I know what OpenGL, DirectX, Vulkan, Metal, etc... are, I already know what they are used ...
user avatar
0 votes
0 answers
184 views

Queue from a family queue that supports presentation doesn't work [Vulkan]

I'm following this tutorial on Vulkan and I tried to see if it actually worked with different queues for drawing and presenting the image of the triangle. My GPU supports presentation with every queue ...
user avatar
  • 9
0 votes
1 answer
396 views

Feeding acceleration structure to the GPU then raytracing it in a compute shader?

I want to use Vulkan's rasterization to solve for the visibility problem, but once that is done I want to do shading, reflection and transmission through a raytracer which also runs on the GPU. With a ...
user avatar
  • 284
1 vote
1 answer
332 views

Retrieve real distance from depth buffer for shadow ray (vulkan hybrid rendering)

I'm trying to implement an hybrid renderer based on Vulkan extension VK_NV_ray_tracing. Basically, the rasterizer compute the albedo and depth map of the scene. Then I try to compute the distance from ...
user avatar
  • 21
1 vote
1 answer
639 views

Vulkan: using gl_PrimitiveID without geometryShader feature

When compiling a glsl fragment shader which reads gl_PrimitiveID with glslc compiler I get the spirv-1.0 with Geometry capability enabled, which is technically ...
user avatar
1 vote
0 answers
20 views

How to handle object drawables?

Currently the graphics API I am using is Vulkan, but I am trying to find a general enough way to represent the following. In graphics, drawing can be generalized as: Get vertex buffers and send them ...
user avatar
  • 1,447
0 votes
0 answers
388 views

Disable both depth clamp and depth clip in Vulkan (older drivers)

I'd like to store arbitrary float depth, so I have to disable both primitive clipping and depth clamping. I can disable clipping by setting ...
user avatar
2 votes
0 answers
138 views

Difference between Passing Instance Data to Vertex Shader methods

I see two kinds of passing Instance Data to Vertex Shader in different Examples. 1 .Using a Uniform Buffer and filling in an array, like below ...
user avatar
4 votes
0 answers
246 views

Are there any reasons to use power of two textures with modern mobile platforms?

Are there any reasons to use power of two textures (like 128x128 sized) if one targets modern mobile platforms (with OpenGL ES 3.0, Metal and/or Vulkan)? With iOS the PVRTC only supports power of two ...
user avatar
1 vote
0 answers
472 views

Compute shader only 5 times faster on the GPU than on the CPU

I'm running following compute shader in Vulkan. worldImage is device local memory that holds the world. resultImage is reference to the memory of the swapchain image: ...
user avatar
0 votes
1 answer
188 views

Only each third image in swapchain is being used, causing flickering

I've managed to write a "small" Vulkan program that outputs a solid color using compute shader directly to swapchain. However, it doesn't work properly. ImageMemoryBarriers I've setup don't ...
user avatar
2 votes
0 answers
360 views

Out of core rendering

Suppose there is a frame, which is larger that the device memory (I mean, dozens of Gb). And I would like to render to it from a set of textures, which is larger than the host memory (I mean, dozens ...
user avatar
2 votes
0 answers
61 views

Communication between vertex shader executions

Look at this vertex shader: ...
user avatar
1 vote
1 answer
539 views

How was computer graphics libraries or gtk,qt programmed?

I am wondering how was first graphic or image libraries created,I know C and Python ,I want to create plotting application,and I cant imagine these libraries(QT,OpenGL,Vulkan) written by C,how can I ...
user avatar
2 votes
2 answers
1k views

Multiple swapchains in Vulkan app with ImGui

I am integrating imgui into my app using glfw + vulkan example. The function vkCreateSwapchainKHR() is also called by imgui setup logic in addition to my app on the same device and it fails with "...
user avatar