mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 17:22:09 +02:00
arrays for bias calcs
This commit is contained in:
parent
309e59ca8b
commit
d6fb7f8a6f
2 changed files with 4 additions and 4 deletions
|
@ -366,7 +366,7 @@ void RenderShadowSetup::configure(const Config& configuration) {
|
|||
|
||||
void RenderShadowSetup::calculateBiases() {
|
||||
// slope scaling values derived from ratio between original constantBias and slopeBias pairs
|
||||
const std::vector<float> SLOPE_SCALES = {2.7f, 3.0f, 3.7f, 3.5f};
|
||||
const std::array<float, 4> SLOPE_SCALES = { 2.7f, 3.0f, 3.7f, 3.5f };
|
||||
const float CONVERT_BIAS = 100.0f;
|
||||
const float MIN_SCALE_DIVISOR = 0.5f;
|
||||
|
||||
|
@ -376,8 +376,8 @@ void RenderShadowSetup::calculateBiases() {
|
|||
float inverseResolution = 1.0f / (float)resolution;
|
||||
int resolutionScale = DEFAULT_RESOLUTION * inverseResolution;
|
||||
float convertedBias = _biasInput * (CONVERT_BIAS / resolutionScale);
|
||||
std::vector<float> localConstants = std::vector<float>(4);
|
||||
std::vector<float> localSlopes = std::vector<float>(4);
|
||||
std::array<float, 4> localConstants;
|
||||
std::array<float, 4> localSlopes;
|
||||
float scaleFactor = 1.0f;
|
||||
|
||||
for (int i = 0; i < SHADOW_CASCADE_MAX_COUNT; i++) {
|
||||
|
|
|
@ -147,7 +147,7 @@ private:
|
|||
bool changeInDefaultConfigValues{ false };
|
||||
bool distanceTriggeredByConfig{ false };
|
||||
bool biasTriggeredByConfig{ false };
|
||||
std::vector<float> cacasdeDistances = std::vector<float>(8); // 4 max then 4 min distances
|
||||
std::array<float, 8> cacasdeDistances; // 4 max then 4 min distances
|
||||
|
||||
void setConstantBias(int cascadeIndex, float value);
|
||||
void setSlopeBias(int cascadeIndex, float value);
|
||||
|
|
Loading…
Reference in a new issue