Skip to content

Commit

Permalink
Persist pass names through minification
Browse files Browse the repository at this point in the history
  • Loading branch information
Scthe committed Aug 8, 2024
1 parent cf076c4 commit 49fac43
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 33 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "gaussian-splatting-webgpu",
"description": "WebGPU-based renderer for gaussian splatting",
"name": "nanite-webgpu",
"description": "UE5's Nanite implementation using WebGPU. Includes the meshlet LOD hierarchy, software rasterizer and billboard impostors. Culling on both per-instance and per-meshlet basis.",
"version": "1.0.0",
"license": "MIT",
"author": "Marcin Matuszczyk <[email protected]>",
"homepage": "https://scthe.github.io/gaussian-splatting-webgpu",
"repository": "https://github.com/Scthe/gaussian-splatting-webgpu",
"homepage": "https://scthe.github.io/nanite-webgpu",
"repository": "https://github.com/Scthe/nanite-webgpu",
"main": "src/index.web.tsx",
"packageManager": "[email protected]",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/passes/cullInstances/cullInstancesPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { PassCtx } from '../passCtx.ts';
import { SHADER_PARAMS, SHADER_CODE } from './cullInstancesPass.wgsl.ts';

export class CullInstancesPass {
public static NAME: string = CullInstancesPass.name;
public static NAME: string = 'CullInstancesPass';

private readonly pipeline: GPUComputePipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/cullMeshlets/cullMeshletsPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CONFIG } from '../../constants.ts';

/** Pass to cull on meshlet level */
export class CullMeshletsPass {
public static NAME: string = CullMeshletsPass.name;
public static NAME: string = 'CullMeshletsPass';

// shader variant 1
private readonly pipeline_SpreadYZ: GPUComputePipeline;
Expand Down
2 changes: 1 addition & 1 deletion src/passes/debug/dbgMeshoptimizerMeshletsPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from './dbgMeshoptimizerMeshletsPass.wgsl.ts';

export class DbgMeshoptimizerMeshletsPass {
public static NAME: string = DbgMeshoptimizerMeshletsPass.name;
public static NAME: string = 'DbgMeshoptimizerMeshletsPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly uniformsBindings: GPUBindGroup;
Expand Down
2 changes: 1 addition & 1 deletion src/passes/debug/dbgMeshoptimizerPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { RenderUniformsBuffer } from '../renderUniformsBuffer.ts';
import { SHADER_CODE } from './dbgMeshoptimizerPass.wgsl.ts';

export class DbgMeshoptimizerPass {
public static NAME: string = DbgMeshoptimizerPass.name;
public static NAME: string = 'DbgMeshoptimizerPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly uniformsBindings: GPUBindGroup;
Expand Down
2 changes: 1 addition & 1 deletion src/passes/depthPyramid/depthPyramidDebugDrawPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn main_fs(
`;

export class DepthPyramidDebugDrawPass {
public static NAME: string = DepthPyramidDebugDrawPass.name;
public static NAME: string = 'DepthPyramidDebugDrawPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/depthPyramid/depthPyramidPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const createDepthPyramidSampler = (device: GPUDevice) => {
};

export class DepthPyramidPass {
public static NAME: string = DepthPyramidPass.name;
public static NAME: string = 'DepthPyramidPass';

private readonly pipeline: GPUComputePipeline;
private resultTexture: GPUTexture | undefined = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/passes/drawGroundPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn main_fs(fragIn: VertexOutput) -> @location(0) vec4f {
`;

export class DrawGroundPass {
public static NAME: string = DrawGroundPass.name;
public static NAME: string = 'DrawGroundPass';

private pipeline: GPURenderPipeline | undefined;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/naniteBillboard/naniteBillboardPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { SHADER_CODE, SHADER_PARAMS } from './naniteBillboard.wgsl.ts';

/** Render impostor billboards */
export class NaniteBillboardPass {
public static NAME: string = NaniteBillboardPass.name;
public static NAME: string = 'NaniteBillboardPass';

private readonly pipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/naniteCpu/drawNanitesPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getDiffuseTexture } from '../../scene/scene.ts';
import { VERTEX_ATTRIBUTES } from '../../scene/GPUOriginalMesh.ts';

export class DrawNanitesPass {
public static NAME: string = DrawNanitesPass.name;
public static NAME: string = 'DrawNanitesPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/presentPass/presentPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { PassCtx } from '../passCtx.ts';
import { cmdDrawFullscreenTriangle } from '../_shaderSnippets/fullscreenTriangle.wgsl.ts';

export class PresentPass {
public static NAME: string = PresentPass.name;
public static NAME: string = 'PresentPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/rasterizeCombine/rasterizeCombine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { PassCtx } from '../passCtx.ts';
import { cmdDrawFullscreenTriangle } from '../_shaderSnippets/fullscreenTriangle.wgsl.ts';

export class RasterizeCombine {
public static NAME: string = RasterizeCombine.name;
public static NAME: string = 'RasterizeCombine';

private readonly pipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/rasterizeHw/rasterizeHwPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { getDiffuseTexture } from '../../scene/scene.ts';
import { assertIsGPUTextureView } from '../../utils/webgpu.ts';

export class RasterizeHwPass {
public static NAME: string = RasterizeHwPass.name;
public static NAME: string = 'RasterizeHwPass';

private readonly renderPipeline: GPURenderPipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/passes/rasterizeSw/rasterizeSwPass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PassCtx } from '../passCtx.ts';
import { SHADER_CODE, SHADER_PARAMS } from './rasterizeSwPass.wgsl.ts';

export class RasterizeSwPass {
public static NAME: string = RasterizeSwPass.name;
public static NAME: string = 'RasterizeSwPass';

private readonly pipeline: GPUComputePipeline;
private readonly bindingsCache = new BindingsCache();
Expand Down
2 changes: 1 addition & 1 deletion src/scene/renderImpostors/renderImpostors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const DEPTH_FORMAT: GPUTextureFormat = 'depth24plus';
export const IMPOSTOR_BYTES_PER_PIXEL = BYTES_VEC2;

export class ImpostorRenderer {
public static NAME: string = ImpostorRenderer.name;
public static NAME: string = 'ImpostorRenderer';
private static CLEAR_COLOR = [0.0, 0.0, 0.0, 0.0];

private readonly pipeline: GPURenderPipeline;
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -392,21 +392,6 @@ __metadata:
languageName: node
linkType: hard

"gaussian-splatting-webgpu@workspace:.":
version: 0.0.0-use.local
resolution: "gaussian-splatting-webgpu@workspace:."
dependencies:
"@types/dat.gui": "npm:^0.7.9"
dat.gui: "npm:^0.7.9"
esbuild: "npm:^0.21.3"
esbuild-copy-static-files: "npm:^0.1.0"
rimraf: "npm:^5.0.7"
typescript: "npm:^5.4.5"
webgl-obj-loader: "npm:^2.0.8"
wgpu-matrix: "npm:^2.9.0"
languageName: unknown
linkType: soft

"glob@npm:^10.3.7":
version: 10.4.1
resolution: "glob@npm:10.4.1"
Expand Down Expand Up @@ -472,6 +457,21 @@ __metadata:
languageName: node
linkType: hard

"nanite-webgpu@workspace:.":
version: 0.0.0-use.local
resolution: "nanite-webgpu@workspace:."
dependencies:
"@types/dat.gui": "npm:^0.7.9"
dat.gui: "npm:^0.7.9"
esbuild: "npm:^0.21.3"
esbuild-copy-static-files: "npm:^0.1.0"
rimraf: "npm:^5.0.7"
typescript: "npm:^5.4.5"
webgl-obj-loader: "npm:^2.0.8"
wgpu-matrix: "npm:^2.9.0"
languageName: unknown
linkType: soft

"path-key@npm:^3.1.0":
version: 3.1.1
resolution: "path-key@npm:3.1.1"
Expand Down

0 comments on commit 49fac43

Please sign in to comment.