mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-21 19:50:54 +00:00
Merge pull request #43 from MrRaveYard/pr_preview_switch
Add --preview switch that significantly reduces sample count
This commit is contained in:
commit
9b510f3e84
5 changed files with 18 additions and 7 deletions
|
@ -17,6 +17,9 @@
|
|||
extern bool VKDebug;
|
||||
extern int NumThreads;
|
||||
|
||||
extern int coverageSampleCount;
|
||||
extern int bounceSampleCount;
|
||||
|
||||
CPURaytracer::CPURaytracer()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -92,9 +92,6 @@ private:
|
|||
|
||||
static void RunJob(int count, std::function<void(int i)> callback);
|
||||
|
||||
const int coverageSampleCount = 256;
|
||||
const int bounceSampleCount = 2048;
|
||||
|
||||
LevelMesh* mesh = nullptr;
|
||||
std::vector<vec3> HemisphereVectors;
|
||||
std::vector<CPULightInfo> Lights;
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
|
||||
extern bool VKDebug;
|
||||
|
||||
extern int coverageSampleCount;
|
||||
extern int bounceSampleCount;
|
||||
extern int ambientSampleCount;
|
||||
|
||||
GPURaytracer::GPURaytracer()
|
||||
{
|
||||
device = std::make_unique<VulkanDevice>(0, VKDebug);
|
||||
|
|
|
@ -90,9 +90,6 @@ private:
|
|||
static float RadicalInverse_VdC(uint32_t bits);
|
||||
static vec2 Hammersley(uint32_t i, uint32_t N);
|
||||
|
||||
const int coverageSampleCount = 256;
|
||||
const int bounceSampleCount = 2048;
|
||||
const int ambientSampleCount = 2048;
|
||||
int rayTraceImageSize = 1024;
|
||||
|
||||
LevelMesh* mesh = nullptr;
|
||||
|
|
12
src/main.cpp
12
src/main.cpp
|
@ -119,6 +119,10 @@ bool CPURaytrace = false;
|
|||
bool VKDebug = false;
|
||||
bool DumpMesh = false;
|
||||
|
||||
int coverageSampleCount = 256;
|
||||
int bounceSampleCount = 2048;
|
||||
int ambientSampleCount = 2048;
|
||||
|
||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||
|
||||
static option long_opts[] =
|
||||
|
@ -157,10 +161,11 @@ static option long_opts[] =
|
|||
{"cpu-raytrace", no_argument, 0, 'C'},
|
||||
{"vkdebug", no_argument, 0, 'D'},
|
||||
{"dump-mesh", no_argument, 0, 1004},
|
||||
{"preview", no_argument, 0, 1005},
|
||||
{0,0,0,0}
|
||||
};
|
||||
|
||||
static const char short_opts[] = "wVgGvbNrReEm:o:f:p:s:d:PqtzZXx5cj:S:CD:";
|
||||
static const char short_opts[] = "wVgGvbNrReEm:o:f:p:s:d:PqtzZXx5cj:S:CD::";
|
||||
|
||||
// CODE --------------------------------------------------------------------
|
||||
|
||||
|
@ -457,6 +462,11 @@ static void ParseArgs(int argc, char **argv)
|
|||
case 1004:
|
||||
DumpMesh = true;
|
||||
break;
|
||||
case 1005:
|
||||
coverageSampleCount = 4;
|
||||
bounceSampleCount = 16;
|
||||
ambientSampleCount = 16;
|
||||
break;
|
||||
case 1000:
|
||||
ShowUsage();
|
||||
exit(0);
|
||||
|
|
Loading…
Reference in a new issue