במדריך הזה מוסבר איך ליצור כותרות Vulkan C++ לכל מערכת הפעלה של מארח באמצעות קובצי ההצללה.
יצירת כותרות C++ מקובצי ההצללה (shader)
מורידים למחשב המקומי את Khronos Group Glslang: Candidate of 26 ביולי 2020.
מחלצים את הקובץ.
בודקים את הגרסה:
חלונות
bin\glslangValidator --version
macOS
./bin/glslangValidator --version
Linux
./bin/glslangValidator --version
במאגר של Cardboard, מוצאים את התיקייה
sdk/rendering/android/shaders
ושומרים את הנתיב שלה.יוצרים את קובצי הכותרת Vulkan ב-C++:
חלונות
bin\glslangValidator -V --vn distortion_frag
%SHADERS_FOLDER_PATH% \distortion.frag -o distortion_frag.spv.hbin\glslangValidator -V --vn distortion_vert
%SHADERS_FOLDER_PATH% \distortion.vert -o distortion_vert.spv.hmacOS
./bin/glslangValidator -V --vn distortion_frag
$SHADERS_FOLDER_PATH /distortion.frag -o distortion_frag.spv.h./bin/glslangValidator -V --vn distortion_vert
$SHADERS_FOLDER_PATH /distortion.vert -o distortion_vert.spv.hLinux
./bin/glslangValidator -V --vn distortion_frag
$SHADERS_FOLDER_PATH /distortion.frag -o distortion_frag.spv.h./bin/glslangValidator -V --vn distortion_vert
$SHADERS_FOLDER_PATH /distortion.vert -o distortion_vert.spv.h
עכשיו אמורים להיות לכם distortion_frag.spv.h ו-distortion_frag.spv.h.