wgsl_reflect icon indicating copy to clipboard operation
wgsl_reflect copied to clipboard

Issue with override and "/"

Open alienself opened this issue 1 year ago • 1 comments

Hi there!

I am encountering an issue with WGSL's override feature in the following code snippet:

override AP_SLICE_COUNT: f32 = 32.0;
override AP_DISTANCE_PER_SLICE: f32 = 4.0;

override AP_INV_DISTANCE_PER_SLICE: f32 = 1.0 / AP_DISTANCE_PER_SLICE; // <--- HERE

The error message I receive is: "Expected ';'". It appears that the issue arises when attempting to define an override based on the value of an existing override. It seems the library is having trouble handling this dependency.

alienself avatar Sep 18 '24 00:09 alienself

I pushed a git update to that fixes this issue. I still need to do more testing.

brendan-duncan avatar Sep 24 '24 01:09 brendan-duncan