Commit 677e32c9 by Bernhard Kerbl

Revert "Support for fill color"

This reverts commit af946bea.
parent af946bea
......@@ -264,7 +264,6 @@ __global__ void renderCUDA(
float* __restrict__ final_T,
uint32_t* __restrict__ n_contrib,
const float* __restrict__ bg_color,
const float* __restrict__ fill_bg_color,
float* __restrict__ out_color)
{
// Identify current tile and associated min/max pixel range.
......@@ -363,11 +362,6 @@ __global__ void renderCUDA(
{
final_T[pix_id] = T;
n_contrib[pix_id] = last_contributor;
if(last_contributor == 0)
for (int ch = 0; ch < CHANNELS; ch++)
out_color[ch * H * W + pix_id] = fill_bg_color[ch];
else
for (int ch = 0; ch < CHANNELS; ch++)
out_color[ch * H * W + pix_id] = C[ch] + T * bg_color[ch];
}
......@@ -384,7 +378,6 @@ void FORWARD::render(
float* final_T,
uint32_t* n_contrib,
const float* bg_color,
const float* fill_bg_color,
float* out_color)
{
renderCUDA<NUM_CHANNELS> << <grid, block >> > (
......@@ -397,7 +390,6 @@ void FORWARD::render(
final_T,
n_contrib,
bg_color,
fill_bg_color,
out_color);
}
......
......@@ -48,7 +48,6 @@ namespace FORWARD
float* final_T,
uint32_t* n_contrib,
const float* bg_color,
const float* fill_bg_color,
float* out_color);
}
......
......@@ -38,8 +38,7 @@ namespace CudaRasterizer
const float tan_fovx, float tan_fovy,
const bool prefiltered,
float* out_color,
int* radii = nullptr,
const float* fill_background = nullptr);
int* radii = nullptr);
static void backward(
const int P, int D, int M, int R,
......
......@@ -205,8 +205,7 @@ int CudaRasterizer::Rasterizer::forward(
const float tan_fovx, float tan_fovy,
const bool prefiltered,
float* out_color,
int* radii,
const float* fill_background)
int* radii)
{
const float focal_y = height / (2.0f * tan_fovy);
const float focal_x = width / (2.0f * tan_fovx);
......@@ -216,10 +215,9 @@ int CudaRasterizer::Rasterizer::forward(
GeometryState geomState = GeometryState::fromChunk(chunkptr, P);
if (radii == nullptr)
{
radii = geomState.internal_radii;
if (fill_background == nullptr)
fill_background = background;
}
dim3 tile_grid((width + BLOCK_X - 1) / BLOCK_X, (height + BLOCK_Y - 1) / BLOCK_Y, 1);
dim3 block(BLOCK_X, BLOCK_Y, 1);
......@@ -320,7 +318,6 @@ int CudaRasterizer::Rasterizer::forward(
imgState.accum_alpha,
imgState.n_contrib,
background,
fill_background,
out_color);
return num_rendered;
......@@ -363,7 +360,9 @@ void CudaRasterizer::Rasterizer::backward(
ImageState imgState = ImageState::fromChunk(img_buffer, width * height);
if (radii == nullptr)
{
radii = geomState.internal_radii;
}
const float focal_y = height / (2.0f * tan_fovy);
const float focal_x = width / (2.0f * tan_fovx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment