summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJonathan Hamilton <jtrhamilton@gmail.com>2018-07-02 09:46:16 -0700
committerJonathan Hamilton <jtrhamilton@gmail.com>2018-07-02 09:53:54 -0700
commitb54803a074ad8ee02ee5c7073db237acb705bf7b (patch)
tree06862830cbc7f77a042ad3d3d3efa160daa5af29 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent431b9e76be390afe520464b81861aeb27955ddbd (diff)
Remove unused sRGB conversion functions
Now the arbitrary mipmap reference downsampling is just done in linear space, these are no longer used.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 283f9c597c..4a8807954e 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -544,19 +544,6 @@ public:
}
private:
- static float SRGBToLinear(u8 srgb_byte)
- {
- auto srgb_float = static_cast<float>(srgb_byte) / 256.f;
- // approximations found on
- // http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html
- return srgb_float * (srgb_float * (srgb_float * 0.305306011f + 0.682171111f) + 0.012522878f);
- }
-
- static u8 LinearToSRGB(float linear)
- {
- return static_cast<u8>(std::max(1.055f * std::pow(linear, 0.416666667f) - 0.055f, 0.f) * 256.f);
- }
-
struct Shape
{
u32 width;
@@ -569,12 +556,6 @@ private:
Shape shape;
const u8* pixels;
- static PixelRGBAf Sample(const u8* src, const Shape& src_shape, u32 x, u32 y)
- {
- const auto* p = src + (x + y * src_shape.row_length) * 4;
- return {{SRGBToLinear(p[0]), SRGBToLinear(p[1]), SRGBToLinear(p[2]), SRGBToLinear(p[3])}};
- }
-
static PixelRGBAu8 SampleLinear(const u8* src, const Shape& src_shape, u32 x, u32 y)
{
const auto* p = src + (x + y * src_shape.row_length) * 4;