Skip to content

wgsl for loop syntax? #2559

Answered by kyoobey
kyoobey asked this question in Q&A
Mar 27, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

looks like support for ++ or += hasn't been added.
this works:

for(var i: i32 = 0; i < 4; i=i+1) {
	if a == 0 {
		continue;
	}
	a = a + 2;
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kvark
Comment options

Answer selected by kyoobey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants