RenderPass for Vulkan

RenderPass RenderPass is a new concept proposed by modern graphics API. Simply put, RenderPass is an execution of the entire Render Pipeline. The essence of RenderPass is to define a complete rendering process and a description of all resources used. It can be understood as a metadata or placeholder concept that does not contain any […]

ncnn vulkan reasoning examples with classes

ncnn vulkan reasoning examples with classes flyfish environment ncnn-android-vulkan.zip 20230517 opencv 4.6.0 Development environment Qt 6.2.4 model yolov5_62 Build Kit Clang arm64-v8a ndk 25 and api 28 versions are as follows head File #ifndef YOLOV5GPU_H #define YOLOV5GPU_H #include <string> #include <vector> #include <algorithm> // ncnn #include “layer.h” #include “net.h” #include “benchmark.h” #include <opencv2/opencv.hpp> struct Object […]

Vulkan memory model + management

Foreword Recently, I am studying Vulkan. Using memory in Vulkan is a troublesome process, and it is easy to use it wrong. Today I will share with you the memory model of Vulkan. Memory is a scarce resource at any time, and memory management is even more daunting. In today’s advocating user experience, both the […]

Vulkan Tutorial 9 Model Loading & Mipmaps

Directory 28 Load the model Sample mesh load vertices and indices ?edit Vertex deduplication 29 Generating Mipmaps create image Generate Mipmaps Supports linear filtering Sampler 28 Load model We will use the tinyobjloader library to load vertices and faces from OBJ files. It’s fast and easy to integrate since it’s a single-file library like stb_image. […]

Vulkan Tutorial 8 Depth Buffer

Directory 26 3D geometry Depth Image and View 27 Explicitly converting depth images render pass framebuffer clear value Depth and Stencil State Handle window resizing 26 3D geometry The geometry we’ve worked with so far is projected to 3D, but it’s still perfectly planar. In this chapter, we are going to add a Z coordinate […]

Vulkan Tutorial 6 Uniform Buffers

Directory 20 layout and buffer vertex shader Descriptor Set Layout 21 Uniform Buffer update unified data 22 Descriptor pool and sets descriptor pool descriptor set use descriptor set Alignment requirements 20 layout and buffer We can now pass arbitrary attributes to the vertex shader for each vertex, and the model-view-projection matrix will include it as […]

Vulkan Tutorial 5 Vertex Buffers

Directory 16 vertex buffers vertex shader vertex data pipe vertex input 17 Vertex buffer creation buffer creation memory requirements memory allocation Fill the vertex buffer 18 scratch buffer transmission queue Use scratch buffer 19 index buffer Index buffer creation use index buffer 16 vertex buffers We’ll replace the hardcoded vertex data in the vertex shader […]

Vulkan Tutorial 1 Instances and Physical Devices

Directory 0 base code 1 Instance 2 Verification layers 3 Physical Devices and Queue Families 4 Logical Devices and Queues 0 base code First includes the Vulkan headers of the LunarG SDK, which provides functions, structures, and enums. The stdexcept’ and iostream’ headers are included for reporting and propagating errors The function will be called […]

Vulkan Tutorial 2 presentation

Directory 5 window surface 6 swap chain 7 Image View 5 window surface Since Vulkan is a platform-independent API, it cannot interface directly with the window system itself. In order to create a connection between Vulkan and the windowing system to display the results on the screen, we need to use the WSI (Windowing System […]