Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute shader error on Metal #3

Open
Prin-E opened this issue Mar 8, 2019 · 0 comments
Open

Compute shader error on Metal #3

Prin-E opened this issue Mar 8, 2019 · 0 comments

Comments

@Prin-E
Copy link

Prin-E commented Mar 8, 2019

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 :00".

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant