Files
hand-motion-pipeline/third_party/nvdiffrast/csrc/common/rasterize.h
T
liyang ae28d55f81 Update to 2026-09-17 pipeline snapshot; add weights, L20 assets and recording via Git LFS
Source: RGB-D -> Dyn-HaMR -> L20 retargeting -> FoundationPose -> reference repair -> SPIDER,
documented in docs/PIPELINE_LATEST.md and docs/SETUP_AND_WEIGHTS.md. Adds FoundationPose and
nvdiffrast upstream snapshots, requirements/pipeline_venv.txt and the FoundationPose weight
manifest/downloader.

Assets (Git LFS): weights/ (WiLoR detector, HandFlow denoiser, UniDepth-L), FoundationPose
checkpoints, HaMeR checkpoint, Dyn-HaMR HMP model and BMC constraints, L20 URDF/meshes, the
20260915_171525 D405 recording and the two box CADs. MANO models are not redistributed
(third_party/hamer/_DATA/data/mano/README.txt). Environments, caches and run outputs excluded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 11:43:37 +08:00

61 lines
2.8 KiB
C

// Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
#pragma once
//------------------------------------------------------------------------
// Constants and helpers.
#define RAST_CUDA_FWD_SHADER_KERNEL_BLOCK_WIDTH 8
#define RAST_CUDA_FWD_SHADER_KERNEL_BLOCK_HEIGHT 8
#define RAST_GRAD_MAX_KERNEL_BLOCK_WIDTH 8
#define RAST_GRAD_MAX_KERNEL_BLOCK_HEIGHT 8
//------------------------------------------------------------------------
// CUDA forward rasterizer shader kernel params.
struct RasterizeCudaFwdShaderParams
{
const float* pos; // Vertex positions.
const int* tri; // Triangle indices.
const int* in_idx; // Triangle idx buffer from rasterizer.
float* out; // Main output buffer.
float* out_db; // Bary pixel gradient output buffer.
int numTriangles; // Number of triangles.
int numVertices; // Number of vertices.
int width_in; // Input image width.
int height_in; // Input image height.
int width_out; // Output image width.
int height_out; // Output image height.
int depth; // Size of minibatch.
int instance_mode; // 1 if in instance rendering mode.
float xs, xo, ys, yo; // Pixel position to clip-space x, y transform.
};
//------------------------------------------------------------------------
// Gradient CUDA kernel params.
struct RasterizeGradParams
{
const float* pos; // Incoming position buffer.
const int* tri; // Incoming triangle buffer.
const float* out; // Rasterizer output buffer.
const float* dy; // Incoming gradients of rasterizer output buffer.
const float* ddb; // Incoming gradients of bary diff output buffer.
float* grad; // Outgoing position gradients.
int numTriangles; // Number of triangles.
int numVertices; // Number of vertices.
int width; // Image width.
int height; // Image height.
int depth; // Size of minibatch.
int instance_mode; // 1 if in instance rendering mode.
float xs, xo, ys, yo; // Pixel position to clip-space x, y transform.
};
//------------------------------------------------------------------------