AskingQuestions / Shadeup

A language for WebGPU that makes writing shaders easier
https://shadeup.dev
150 stars 4 forks source link

[Base Computer Shader]: Output is always 0 in UE5.1.1 #7

Closed roadstargames closed 1 year ago

roadstargames commented 1 year ago

Thank you for your great examples!

But I alway get 0 on output. Even when change the output to:

Output[0] = Input[0];

This is my 5.1.1 default Third Person test project with plugin if you would to try by yourself (just build the binaries).

https://www.dropbox.com/s/ya9makoru5dfua8/CompShader51.zip?dl=0

Thank you in advance! Vlad

AskingQuestions commented 1 year ago

Thanks for the report and repro.

Looks like the print wire needs to be hooked up to the completed event.

image

It's an async operation so the results are not ready until a frame or so later.

Let me know if that fixes it

roadstargames commented 1 year ago

Oh, man! I've tried but forgot it's working in Runtime only - not in Editor. Thank you once again for such fast response and for your great learning resource! Cheers! Vlad