![見出し画像](https://assets.st-note.com/production/uploads/images/53288727/rectangle_large_type_2_a4f2d32b9955e6312e1852a6f7ed5c34.png?width=1200)
日曜プログラム glTF2 viewer using Vulkan®
ということで、ずいぶんかかってしまったけどvulkanを使ったglTF2表示のプログラムが一通り動くようになった。しんどかった…。
サンプルに使っているモデルは全部CCです。いい時代だなぁ。
ひとまずはこちらのサイトを1ステップずつ実装しては動かす実験を繰り返しました。全部で29ステップ、multisampling するところまであります。29の最後に書いてありますが、ここまでの The knowledge of the basic principles of Vulkan は、次のような more of features を start exploring するのに should be sufficient だそうです。
Push constants
Instanced rendering
Dynamic uniforms
Separate images and sampler descriptors
Pipeline cache
Multi-threaded command buffer generation
Multiple subpasses
Compute shaders
シェーダーは前にも参考にした、ご本尊のsample viewerから。
古い方と新しい方あるけど、ソースが一本にまとまっている古い方で。
日本語の書籍は amazon などで買えるものは存在しないようなので、こちらのオンライン版を購入して参考にさせて頂きました。
先のtutorial は、生のC版で書かれていたので、勉強がてらそれを hpp版に置き換え、ほぼすべてのハンドルもUniqueに置き換えました。
Damaged Helmet , by Leonardo Carrion
This model was originally published under a CC BY-NC 2.0 license.
http://www.leonardocarrion.com/projects/06aJY
"DreadRoamer" (https://skfb.ly/6soJA) by TooManyDemons is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).
"Helmet fantasy" (https://skfb.ly/6YZOE) by KIFIR is licensed under Creative Commons Attribution-NonCommercial (http://creativecommons.org/licenses/by-nc/4.0/).