Skip to content

StableFluid error on Unity2019. #4

Open
@wonkee-kim

Description

@wonkee-kim

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions