-
Notifications
You must be signed in to change notification settings - Fork 1
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
Masks #29
Conversation
Thank you!
Yes, this is counterintuitive. I'll test it this way but for the release I prefer it the other way around. Or is there any reason/convention to keep it this way?
Learnt from Microsoft? :) |
Could we have something like |
Yeah, I forgot to add it. Will do. |
Does the regular init work? You are sending an integer for a weight. |
The original Monoceros works ok with the new DLL (using only the regular init) |
[DllImport("monoceros-wfc-0.5.0-debug.dll", CallingConvention = CallingConvention.StdCall)]
internal static extern unsafe WfcWorldStateInitResult wfc_world_state_init_ex(IntPtr* wfc_world_state_handle_ptr,
AdjacencyRule* adjacency_rules_ptr,
UIntPtr adjacency_rules_len,
ushort world_x,
ushort world_y,
ushort world_z,
uint features,
uint featuresslot_init_value,
float slot_module_weight_init_value,
uint slot_mask_init_value); |
Hopefully brought it up to speed. Merging. |
@janper
This adds two things:
The masks features we talked about: See
wfc_world_state_slot_mask_set
andFeatures::MASKED_SLOTS
(0x04
). If the mask is true, the slot is ignored.. maybe this is unintuitive?wfc_world_state_init_ex
. It is likewfc_world_state_init
, but you can set initial values for slots (fully zeroed vs fully unobserved), weights (just a number that will be copied everywhere), and masks. It should simplify your initialization code slightly.I didn't have time to test this at all, so please do test and let me know if you find any problems. If all goes well, I can make a new release out of this for you.
I still need to benchmark this. It adds a condition to an existing branch in hot code. It should be easily predictable, but who knows.
Fixes:
#28
#18