unity3d - syntax error on #pragma kernal Main -


i have following shader:

#pragma kernal main  rwtexture@d<float4>reult; [numthreads(8,8,1)]  void main (uint3 id:sv_dispatchthreadid) {     result[id,xy]=float4(id.x & id.y, (id.x & 15)/15.0, (id.y & 15)/15.0, 0.0); } 

in unity. creates error "shader error in ":parse error: syntax error @ line 1" //that #pragma kernal main

i have looked around #pragma kernal [name of main function] seems correct syntax doing wrong?

this in unity 5.0.1 32 bits edition

"kernel", not "kernal".

see: unity compute shaders

rwtexture@d -> rwtexture2d next compile error. followed "reult" -> "result", , "id,xy" -> "id.xy".


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -