File tree Expand file tree Collapse file tree
particles-kool/src/commonMain/kotlin/me/dvyy/particles/compute/data Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ class MeanSquareVelocities(
4848 val output = storage<KslFloat1 >(" outputStorage" )
4949 computeStage(1 ) {
5050 main {
51+ // FIXME inGlobalInvocationId read is needed for WebGPU target, otherwise struct passed into shader inputs is not generated
52+ int1Var(inGlobalInvocationId.x.toInt1())
5153 output[0 .const] = inputs[0 .const]
5254 }
5355 }
5456 }
5557
56- private var outputBind by outputShader.storage(" outputStorage" )// .uniformStruct("total", ::SimulationStatisticsStruct)
57-
5858 private var inputs by reduce.storage(" inputs" )
5959 private var outputs by reduce.storage(" outputs" )
6060 private var total by reduce.uniform1i(" total" )
@@ -91,7 +91,7 @@ class MeanSquareVelocities(
9191 }
9292 addTask(outputShader.apply {
9393 storage(" inputs" ).set(readBack)
94- outputBind = output
94+ storage( " outputStorage " ).set( output)
9595 }, Vec3i (1 , 1 , 1 ))
9696 }
9797 }
You can’t perform that action at this time.
0 commit comments