UnityGraphicsProgramming
UnityGraphicsProgramming copied to clipboard
Compute shader error on Metal
I'm using 2018.3.6f1, MacBook Pro. I found out that some compute shaders are not correctly compiled on Metal because the lines of #pragma kernel contain comments. Unity shows error like "Macro names must be identifiers at kernel [KERNEL_NAME] metal
ex) Boids.compute
// カーネル関数を指定
#pragma kernel ForceCS // 操舵力を計算
#pragma kernel IntegrateCS // 速度, 位置を計算
When I remove comments at the right, I can run samples without problems.
// カーネル関数を指定
#pragma kernel ForceCS
#pragma kernel IntegrateCS
Maybe it's Unity bug but I think it's safe to delete comments after #pragma kernel lines.