コンピュートシェーダ

Unityのコンピュートシェーダで普通の関数を別ファイルに分ける時は,hlslファイルにする

カーネル関数を含む => 拡張子はcompute 普通の関数のみ => 拡張子はhlsl // Hoge.hlslにする.Hoge.computeにしてはならない #ifndef HOGEHLSL #define HOGEHLSL float Hoge(float r) { return r; } #endif // Main.compute #include "Hoge.hlsl" [numthrea…