יצירת קובצי כותרת Vulkan לכל תוכנת הצללה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במדריך הזה מוסבר איך ליצור כותרות Vulkan C++ לכל מערכת הפעלה של מארח באמצעות קובצי ההצללה.
מורידים למחשב המקומי את 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.h
bin\glslangValidator -V --vn distortion_vert %SHADERS_FOLDER_PATH%\distortion.vert -o distortion_vert.spv.h
macOS
./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
Linux
./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.
כל הזכויות שמורות. Java הוא סימן מסחרי רשום של Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-09 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-09-09 (שעון UTC)."],[[["This guide provides instructions on generating Vulkan C++ header files from shader files for use in your application."],["You will need to download and install the Khronos Group Glslang tool to convert shader files into header files."],["The process involves locating your shader files and using the glslangValidator tool with specific commands to generate the corresponding header files."],["The generated header files, `distortion_frag.spv.h` and `distortion_vert.spv.h`, will contain the Vulkan-compatible code derived from your shaders."]]],[]]