Skip to content

Render without backgroundΒ #542

@LewisBridgeman

Description

@LewisBridgeman

I am trying to figure out how to return an RGBA image without combining with the solid background colour inside the rasterizer.
I've adjusted the out_color variable to have an extra channel, and in the forward pass (forward.cu) it is simple enough to make the change:

if (inside)
{
  final_T[pix_id] = T;
  n_contrib[pix_id] = last_contributor;
  for (int ch = 0; ch < CHANNELS; ch++)
	  out_color[ch * H * W + pix_id] = C[ch]; // + T * bg_color[ch];
  out_color[CHANNELS * H * W + pix_id] = 1-T;
}

But I am unsure about how to make the change in the backward pass. Any ideas how this might be implemented?

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