🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Vulkan shadow (cube) maps

Started by
23 comments, last by taby 1 year, 2 months ago

taby said:

This might be helpful for beginners.

My question is: where is ktxTexture_Destroy is defined? It’s declared in ktx.h.

what file is the base project?

Yes! It is defined in ktx.h which is included in the base project: Vulkan/base at master · SaschaWillems/Vulkan (github.com)

I recommend you to download the repo and use

cmake -G "Visual Studio 16 2019" -A x64 

from the command prompt to generate the VS project files automatically. Don't create your own project from scratch.

Advertisement

Which file? There is only a header declaration in ktx.h. The body is not defined. Missing a CPP file. which file?

Clone the repo using the command prompt in a folder of your choice (if you don't have git, install it before proceeding)

git clone --recursive https://github.com/SaschaWillems/Vulkan​

From the command prompt, enter the Vulkan directory and type the following command (if you don't have cmake, install it before proceeding)

cmake -G "Visual Studio 16 2019" -A x64 

If it gives you an error, delete CMakeCache.txt and try the following

cmake -G "Visual Studio 17 2022"

Download and extract the following archive in the Vulkan folder (overwrite the data folder)

http://vulkan.gpuinfo.org/downloads/vulkan_asset_pack_gltf.zip

Open vulkanExamples.sln with Visual Studio. Enjoy!

taby said:

Which file? There is only a header declaration in ktx.h. The body is not defined. Missing a CPP file. which file?

Vulkan/texture.c at a2a604be473c829763854ffb34f7978bc0358afb · SaschaWillems/Vulkan (github.com)

OK, so I got it to compile and link using my own project, as well as using the cmake-generated project. The app however runs briefly and then exits. I'm not putting the shaders and whatnot in the right directory? The error handling is non-existent.

Yes, it appears that I'm missing the gltf files. Any idea where models/cube.gltf can be downloaded from?

P.S. I found the download_assets.py, and it's downloading now. Thanks for all of your help!

It's too bad that the example is so bloated with unnecessary code. :(

As a consolation I got a spotlight working, by using the code from Vulkan Cookbook ( https://github.com/PacktPublishing/Vulkan-Cookbook ):

I will settle for this code, for sure!

@pam79 Have you played around with this omnidirectional shadow mapping tutorial?

I'm trying to alter the height of the light, and if I increase y, it moves down, and if I decrease y, it moves up. It's backwards. Did you fix this somehow, when you tried it out?

Why do opengl proj matrices fail in vulkan

This topic is closed to new replies.

Advertisement