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

Method Init

BakingLab/MeshBaker.cpp:1070–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1068 volatile int64* CurrTile = nullptr;
1069
1070 void Init(FixedArray<Half4>* renderBuffer, FixedArray<float>* renderWeightBuffer,
1071 const std::vector<IntegrationSamples>* samples,
1072 volatile int64* currTile, const MeshBaker* meshBaker, uint64 newTag)
1073 {
1074 if(RenderTag == uint64(-1))
1075 RandomGenerator.SeedWithRandomValue();
1076
1077 RenderTag = newTag;
1078 SkyCache.Init(AppSettings::SunDirection, AppSettings::GroundAlbedo, AppSettings::Turbidity);
1079 SceneBVH = &meshBaker->sceneBVH;
1080 EnvMaps = meshBaker->input.EnvMapData;
1081 OutputWidth = meshBaker->currWidth;
1082 OutputHeight = meshBaker->currHeight;
1083 CameraPos = meshBaker->currCameraPos;
1084 CameraOrientation = meshBaker->currCameraOrientation;
1085 Proj = meshBaker->currProj;
1086 ViewProjInv = meshBaker->currViewProjInv;
1087 CurrNumTiles = meshBaker->currNumTiles;
1088 RenderBuffer = renderBuffer;
1089 RenderWeightBuffer = renderWeightBuffer;
1090 CurrTile = currTile;
1091 CurrSampleMode = AppSettings::RenderSampleMode;
1092 CurrNumSamples = AppSettings::NumRenderSamples;
1093 Samples = samples;
1094 }
1095};
1096
1097// Runs a single iteration of the ground truth render thread. This function will compute

Callers

nothing calls this directly

Calls 2

SeedWithRandomValueMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected