Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
diff-gaussian-rasterization
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan de Oliveira
diff-gaussian-rasterization
Commits
677e32c9
Commit
677e32c9
authored
Jun 20, 2023
by
Bernhard Kerbl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Support for fill color"
This reverts commit
af946bea
.
parent
af946bea
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
17 deletions
+6
-17
forward.cu
cuda_rasterizer/forward.cu
+0
-8
forward.h
cuda_rasterizer/forward.h
+0
-1
rasterizer.h
cuda_rasterizer/rasterizer.h
+1
-2
rasterizer_impl.cu
cuda_rasterizer/rasterizer_impl.cu
+5
-6
No files found.
cuda_rasterizer/forward.cu
View file @
677e32c9
...
...
@@ -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);
}
...
...
cuda_rasterizer/forward.h
View file @
677e32c9
...
...
@@ -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
);
}
...
...
cuda_rasterizer/rasterizer.h
View file @
677e32c9
...
...
@@ -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
,
...
...
cuda_rasterizer/rasterizer_impl.cu
View file @
677e32c9
...
...
@@ -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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment