Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc Pavement undefined #749

Open
kpfriesen opened this issue Feb 2, 2025 · 2 comments
Open

Arc Pavement undefined #749

kpfriesen opened this issue Feb 2, 2025 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@kpfriesen
Copy link

Material Maker version:
tested on itch alpha 14a2 and #1975

OS/device including version:

EndeavourOS
NVidia 3070 Ti 565

Issue description:
Arc Pavement node shows correct patterns when hovered in 2d inspector
when any of the output ports are connected to another node I get the node's compute shader code and the following error:

COMPUTE SHADER ERROR: Failed parse:
ERROR: 0:86: 'PI' : undeclared identifier 
ERROR: 0:86: '' : compilation terminated 
ERROR: 2 compilation errors.  No code generated.



buffer is invalid

line is different from 14a2 to #1975 but the code breaks on
86: float cornerangle = 0.85/acount+0.25*PI; in the compute shader or the corresponding line in addons/material_maker/nodes/hbao.mmg:
36 "\tfloat cornerangle = 0.85/acount+0.25*PI;",

Steps to reproduce:
plug any of the output ports from the arc pavement node into a node that's linked to the output

@kpfriesen kpfriesen added the bug Something isn't working label Feb 2, 2025
@kpfriesen
Copy link
Author

I greped for other uses of the PI constant and anisotropic_kuwahara.mmg declares it in the node so presumably that's the fix here. I've not committed to the repo before but I'd be happy to copy over the pi declaration into arc pavement if that'd be helpful.

@RodZill4
Copy link
Owner

RodZill4 commented Feb 2, 2025

PI and TAU declarations should be removed from the nodes (well, not in the case of anisotropic Kuwahara, since it's declared locally) and declared global when generating compute shaders.

@RodZill4 RodZill4 added this to the 1.4 milestone Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants