Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Physical Shader Error #56

Closed
Reality-Dev opened this issue Feb 28, 2023 · 1 comment
Closed

Physical Shader Error #56

Reality-Dev opened this issue Feb 28, 2023 · 1 comment

Comments

@Reality-Dev
Copy link

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.

@rezaali
Copy link
Collaborator

rezaali commented Mar 1, 2023

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

@rezaali rezaali closed this as completed Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants