Skip to content

Why is this doing? #3

Open
Open

Description

@jacwilso

if (numberOfFrames > 2) mainC.RemoveCommandBuffer(CameraEvent.AfterDepthTexture, cb_markingIlsdands);

I'm confused about what is actually happening here, you add the command buffer on start then remove it after the 2nd frame. Why?

Activity

  1. IRCSS commented on Jan 8, 2021

    @IRCSS
    Owner

    Since the UV layout doesnt change across time, the islands need to be marked only once. I dont remember why it is 2 and not 1 there, seems like like this would mark the islands twice instead of once (which is wasted performance, other than that has no effect).

    Alternatively you can write a function that calls drawprocedural and dispatchCompute, and call them once on start or something instead of packing it in a command buffer and removing it after it has been executed once.

    So short answer, the construct is there to call a series of GPU commands only once, seems like it is doing it twice, I am not sure why I did that at the time, maybe there was a reason like something not having been initialized on frame one or something. You can change that to one and if everything works as intended, then that is just a mistake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions