Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

SurfaceShaders and ComputeBuffers?

Discussion in 'Shaders' started by bdev, Oct 9, 2013.

  1. bdev

    bdev

    Joined:
    Jan 4, 2011
    Posts:
    656
    Hi there.

    I'm curious if there is any means of filling a ComputeBuffer ( RWStructuredBuffer<> ) on the GPU while being able to use it similarly to Graphics.DrawProceduralIndirect but via a surface shader with shadow collectors and casters.. Kind of like Graphics.DrawMesh (not DrawMeshNow)

    As far as I can tell, it seems like you cannot. And seems like it would be impossible to utilize unity's shadow system with gpu meshes because of it (even without SurfaceShaders).

    Does anyone know of a solution? I'd love to be wrong here.
     
  2. bdev

    bdev

    Joined:
    Jan 4, 2011
    Posts:
    656
    Bumping this once more before all hope is lost!
     
  3. thundax

    thundax

    Joined:
    Feb 13, 2012
    Posts:
    27
    Have you looked into Graphics.DrawProceduralIndirect() ?