diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2025-07-26 11:17:10 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2025-07-26 11:17:10 +0100 |
| commit | 10bfc58085c6ab7e62077a1a9b6a6d922fffb025 (patch) | |
| tree | 3e1d3ff39891c2c2408235c209566f4c51915859 /src/RaytraceContext.ts | |
| parent | ebc500c522e7233fbc6037bce0569edf3a0b5136 (diff) | |
| download | js-raytracer-10bfc58085c6ab7e62077a1a9b6a6d922fffb025.tar.xz js-raytracer-10bfc58085c6ab7e62077a1a9b6a6d922fffb025.zip | |
Rework multithreaded rendering
Render worker tasks are now split into chunks rather than row blocks for better thread utilisation
Diffstat (limited to 'src/RaytraceContext.ts')
| -rw-r--r-- | src/RaytraceContext.ts | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/RaytraceContext.ts b/src/RaytraceContext.ts deleted file mode 100644 index acd4336..0000000 --- a/src/RaytraceContext.ts +++ /dev/null @@ -1,43 +0,0 @@ -import {Type} from 'class-transformer'; -import {Colour} from './Colour'; -import {Plane, Sphere} from './Geometry'; -import {Light} from './Light'; - -export class RaytraceContext { - @Type(() => Sphere) - readonly spheres: Sphere[]; - @Type(() => Plane) - readonly planes: Plane[]; - @Type(() => Light) - readonly lights: Light[]; - @Type(() => Colour) - readonly backgroundColour: Colour; - constructor( - readonly height: number, - readonly width: number, - readonly fov: number, - spheres: Sphere[], - planes: Plane[], - lights: Light[], - backgroundColour: Colour, - readonly options: RaytracerOptions - ) { - this.spheres = spheres; - this.planes = planes; - this.lights = lights; - this.backgroundColour = backgroundColour; - } -} - -export interface RaytracerOptions { - numThreads: number; - shadows: boolean; - diffuseLighting: boolean; - specularLighting: boolean; - reflections: boolean; - refractions: boolean; - maxRecurseDepth: number; - maxDrawDistance: number; - bufferDrawCalls: boolean; - directMemoryTransfer: boolean; -} |