Skip to content

Commit

Permalink
Full HD 50 spp.
Browse files Browse the repository at this point in the history
  • Loading branch information
kugimasa committed Aug 29, 2023
1 parent 0022774 commit 77c5ff4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion resources/shader/compute-sample.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const kYup = vec3f(0.0, 1.0, 0.0);
const kRayDepth = 5;
const kRayMin = 1e-6;
const kRayMax = 1e20;
const kSPP = 750;
const kSPP = 50;
const kZero = vec3f(0.0, 0.0, 0.0);
const kOne = vec3f(1.0, 1.0, 1.0);

Expand Down
4 changes: 2 additions & 2 deletions src/include/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Renderer {
void InitBindGroup();

private:
static const uint32_t WIDTH = 640;
static const uint32_t HEIGHT = 480;
static const uint32_t WIDTH = 1920;
static const uint32_t HEIGHT = 1080;
static const uint32_t MAX_FRAME = 600;
Camera camera_{};
Scene scene_{};
Expand Down
6 changes: 3 additions & 3 deletions src/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ bool Renderer::InitDevice() {
requiredLimits.limits.maxStorageBuffersPerShaderStage = 3;
requiredLimits.limits.maxStorageBufferBindingSize = WIDTH * HEIGHT * sizeof(float);;
requiredLimits.limits.maxStorageTexturesPerShaderStage = 1;
requiredLimits.limits.maxComputeWorkgroupSizeX = 80;
requiredLimits.limits.maxComputeWorkgroupSizeY = 60;
requiredLimits.limits.maxComputeWorkgroupSizeX = 240;
requiredLimits.limits.maxComputeWorkgroupSizeY = 135;
requiredLimits.limits.maxComputeWorkgroupSizeZ = 1;
requiredLimits.limits.maxComputeInvocationsPerWorkgroup = 64;
requiredLimits.limits.maxComputeWorkgroupsPerDimension = 80;
requiredLimits.limits.maxComputeWorkgroupsPerDimension = 250;
// This must be set even if we do not use storage buffers for now
requiredLimits.limits.minStorageBufferOffsetAlignment = supported_limits.limits.minStorageBufferOffsetAlignment;
// This must be set even if we do not use uniform buffers for now
Expand Down

0 comments on commit 77c5ff4

Please sign in to comment.