Skip to content

ReadWrite buffer for one shader, ReadOnly buffer in another shader?Β #890

@jkant

Description

@jkant

First of all let me just say this is a really useful package, and thank you for putting it together.

I am coming from game development where I write a lot of shaders (including compute shaders) in HLSL and use Unity's API wrapper to dispatch them.

Is it possible to allocate one buffer to be used as a ReadOnly buffer in one shader, after it has been written to as a ReadWrite buffer in another shader? I am used to doing this in Unity, but so far from playing with ComputeSharp it doesn't seem to be possible, as I need to specify the buffer usage when allocating the buffer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    question ❓Further information is requesteduntriaged 🧰A new issue that needs initial triage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions