Hi-Rez / Satin

A 3D Graphics Framework built on Apple's Metal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Physical Shader Error

Reality-Dev opened this issue · comments

I tried using the default PhysicalMaterial and got this error:

Physical Shader: program_source:985:5: error: no matching function for call to 'pbrDirectLighting'
    pbrDirectLighting(pixel, lights);
    ^~~~~~~~~~~~~~~~~
program_source:673:6: note: candidate function not viable: no known conversion from 'const constant Light' to 'const constant Light *' for 2nd argument; take the address of the argument with &
void pbrDirectLighting(thread PixelInfo &pixel, constant Light *lights)
     ^

There appears to be a missing ampersand on this line in the Physical Shader.

Other calls to pbrDirectLighting within this repo use an ampersand, such as this one and this one.

I cloned Stain, added an ampersand to that line, added it as a local swift package and the error went away.

@Reality-Dev this should be fixed in master. Please let me know if this still doesn't work.