MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/RTXGI-DDGI / ParsePostProcess

Function ParsePostProcess

samples/test-harness/src/Config.cpp:398–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396}
397
398bool ParsePostProcess(std::string &configString, PostProcessOptions &options, std::ofstream &log)
399{
400 std::string line;
401 std::stringstream stream;
402
403 size_t index = configString.find("#[postprocess]");
404 if (index == std::string::npos) return true;
405
406 stream.str(configString.substr(index));
407
408 bool status = true;
409 while (!stream.eof())
410 {
411 getline(stream, line, '\n');
412 if (line.find_first_of("#") == 0) continue; // commented line, skip it
413
414 if (ParseIfExists("AORadius=", options.AORadius, line, status, log)) continue;
415 if (ParseIfExists("AOBias=", options.AOBias, line, status, log)) continue;
416 if (ParseIfExists("AOFilterDepthSigma=", options.AOFilterDepthSigma, line, status, log)) continue;
417 if (ParseIfExists("AOPower=", options.AOPowerLog, line, status, log)) continue;
418
419 if (!status) return false;
420 }
421 return true;
422}
423
424bool ParseViz(std::string &configString, VizOptions &options, std::ofstream &log)
425{

Callers 1

ParseConfigFunction · 0.85

Calls 1

ParseIfExistsFunction · 0.85

Tested by

no test coverage detected