You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the StableFluid - Solver2D.cs, you didn't assign texture for the Project-Step2 kernel and it causes an error on Unity 2019 version. It is fine on Unity2017 but can be an issue on Unity2019.
I would suggest you add below code at line 93 and 117. computeShader.SetTexture(kernelMap[ComputeKernels.ProjectStep2], velocityId, velocityTex);
And also on the Solver2D.compute, on 'AdvectVelocity' kernel function,
at line 234, you used GetDimensions(w,h) using density texturebuffer which requires SetTexture(density),
in this context, using velocity texturebuffer is better way to solve the error.
(x) density.GetDimensions(w, h);
(o) velocity.GetDimensions(w, h);
Thank you for the awesome code!
The text was updated successfully, but these errors were encountered:
But after fixing those things, there is a weird horizontal artefact for the fluid simulation.
I am having look at it and once I solve the problem, I will share it as well.
For the StableFluid - Solver2D.cs, you didn't assign texture for the Project-Step2 kernel and it causes an error on Unity 2019 version. It is fine on Unity2017 but can be an issue on Unity2019.
I would suggest you add below code at line 93 and 117.
computeShader.SetTexture(kernelMap[ComputeKernels.ProjectStep2], velocityId, velocityTex);
And also on the Solver2D.compute, on 'AdvectVelocity' kernel function,
at line 234, you used GetDimensions(w,h) using density texturebuffer which requires SetTexture(density),
in this context, using velocity texturebuffer is better way to solve the error.
(x)
density.GetDimensions(w, h);
(o)
velocity.GetDimensions(w, h);
Thank you for the awesome code!
The text was updated successfully, but these errors were encountered: