MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / Init

Method Init

BakingLab/MeshBaker.cpp:441–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439 volatile int64* CurrBatch = nullptr;
440
441 void Init(FixedArray<Half4>* bakeOutput, const std::vector<IntegrationSamples>* samples,
442 volatile int64* currBatch, const MeshBaker* meshBaker, uint64 newTag)
443 {
444 if(BakeTag == uint64(-1))
445 RandomGenerator.SeedWithRandomValue();
446
447 BakeTag = newTag;
448 SkyCache.Init(AppSettings::SunDirection, AppSettings::GroundAlbedo, AppSettings::Turbidity);
449 SceneBVH = &meshBaker->sceneBVH;
450 EnvMaps = meshBaker->input.EnvMapData;
451 BakePoints = &meshBaker->bakePoints;
452 CurrNumBatches = meshBaker->currNumBakeBatches;
453 CurrLightMapSize = meshBaker->currLightMapSize;
454 CurrBakeMode = meshBaker->currBakeMode;
455 CurrSolveMode = meshBaker->currSolveMode;
456 BakeOutput = bakeOutput;
457 CurrBatch = currBatch;
458 CurrSampleMode = AppSettings::BakeSampleMode;
459 CurrNumSamples = AppSettings::NumBakeSamples;
460 Samples = samples;
461 }
462};
463
464// Runs a single iteration of the bake thread. If the bake mode supports progressive baking,

Callers

nothing calls this directly

Calls 2

SeedWithRandomValueMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected