Huh? Why can't I use vec3? I've tried converting all vec3 to float3 manually, like this
Every time I attempt to write a SceneKit shader modifier, I get a pink screen and a debug screen filled with errors. According to the documents, I should be able to write a SceneKit shader modifier in glsl, but all I get is these errors like
[SceneKit] Error: FATAL ERROR : failed compiling shader:
Error Domain=MTLLibraryErrorDomain Code=3 "Compilation failed:
program_source:2847:41: error: expected parameter declarator
, constant return& float3
^
program_source:2847:50: error: expected ')'
, constant return& float3
^
program_source:2732:38: note: to match this '('
fragment SCNOutput commonprofile_frag(commonprofile_io in [[ stage_in ]]
^
program_source:3340:2: error: expected function body after function declarator
}
^
" UserInfo={NSLocalizedDescription=Compilation failed:
program_source:2847:41: error: expected parameter declarator
, constant return& float3
^
program_source:2847:50: error: expected ')'
, constant return& float3
^
program_source:2732:38: note: to match this '('
fragment SCNOutput commonprofile_frag(commonprofile_io in [[ stage_in ]]
^
program_source:3340:2: error: expected function body after function declarator
}
error: use of undeclared identifier 'vec3'; did you mean 'vec'?