 

#ifndef CUDA_RASTERIZER_FORWARD_H_INCLUDED
#define CUDA_RASTERIZER_FORWARD_H_INCLUDED

#include <cuda.h>
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#define GLM_FORCE_CUDA
#include <glm/glm.hpp>

namespace FORWARD
{
	// Perform initial steps for each Gaussian prior to rasterization.
	void preprocess(int P, int D, int M,
		const float* orig_points,
		const glm::vec3* scales,
		// int* collapsed_axis,
		const float scale_modifier,
		const glm::vec4* rotations,
		const float* opacities,
		const float* shs,
		bool* clamped,
		// const float* cov3D_precomp,
		const float* colors_precomp,
		const float* viewmatrix,
		// const float* projmatrix,
		const float* omni_tan_theta, 
		const float* omni_tan_phi, 
		const glm::vec3* cam_pos,
		const int W, int H,
		const float focal_x, float focal_y,
		const float tan_fovx, float tan_fovy,
		int* radii,
		int* aabb_id,
		// float2* points_xy_image,
		float3* points_xyz_view, 
		float* depths,
		// float* cov3Ds,
		// float* inv_cov3Ds, 
		float* colors,
		float2* h_opacity,
		float3* w2o, 
		// float4* mah_precomp, 
		const dim3 grid,
		uint32_t* tiles_touched,
		bool prefiltered,
		bool antialiasing);

	// Main rasterization method.
	void render(
		const dim3 grid, dim3 block,
		const uint2* ranges,
		const uint32_t* point_list,
		int W, int H,
		const float* tan_theta, 
		const float* tan_phi, 
		// const float focal_x, float focal_y, 
		// const float2* points_xy_image,
		const float3* points_xyz_view, 
		// const float* inv_cov3Ds, 
		const float* features,
		const float2* h_opacity,
		const float3* w2o, 
		// const float4* mah_precomp, 
		// const int* collapsed_axis, 
		float* final_T,
		uint32_t* n_contrib,
		const float* bg_color,
		float* out_color,
		float* depths,
		float* depth);
}

#endif
