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".
rwtexture@d -> rwtexture2d next compile error. followed "reult" -> "result", , "id,xy" -> "id.xy".
Comments
Post a Comment