mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 14:53:01 +02:00
Fix gamma correction adjusting uchar to float when unnecessary
This commit is contained in:
parent
9b137570cf
commit
b800aa793d
1 changed files with 3 additions and 3 deletions
|
@ -788,9 +788,9 @@ bool sphericalHarmonicsFromTexture(const gpu::Texture& cubeTexture, std::vector<
|
||||||
uint pixOffsetIndex = (x + y * width) * numComponents;
|
uint pixOffsetIndex = (x + y * width) * numComponents;
|
||||||
|
|
||||||
// get color from texture and map to range [0, 1]
|
// get color from texture and map to range [0, 1]
|
||||||
glm::vec3 clr(ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex]) * UCHAR_TO_FLOAT,
|
glm::vec3 clr(ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex]),
|
||||||
ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex+1]) * UCHAR_TO_FLOAT,
|
ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex + 1]),
|
||||||
ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex+2]) * UCHAR_TO_FLOAT);
|
ColorUtils::sRGB8ToLinearFloat(data[pixOffsetIndex + 2]));
|
||||||
|
|
||||||
// scale color and add to previously accumulated coefficients
|
// scale color and add to previously accumulated coefficients
|
||||||
sphericalHarmonicsScale(shBuffB.data(), order,
|
sphericalHarmonicsScale(shBuffB.data(), order,
|
||||||
|
|
Loading…
Reference in a new issue