From 9e2bbec47f402f584536434dbdf3353fb817b8e7 Mon Sep 17 00:00:00 2001 From: Rodolfo Osvaldo Bogado Date: Wed, 3 Feb 2010 03:52:50 +0000 Subject: a lot of modifications here :) first fixed scaling when updating backbuffer to make it friendly with encoders, now frame dumping must work without errors in any codec. clean screenshot and frame dumping code now is more correct, faster and stable. improve safe texture cache, improving the distribution of the hash algorithm, including tlut hash in the final hash of the texture, and making use of a 64 bit hash to make it more accurate. clean a lot of code and corrected some missused vertex formats when drawing full screen quads. and biggest change last: implemented pseudo antialiasing: a image post-process algorithm that mimics antialiazing and is fare more easier to implement in this scenario. you can change the intensity of the effect changing the values of the antialiasing combo. the right value depends on the game. for example mkwii looks awesome with 8x. please try all the changes and let me know the results. if something is broken, please let me know and will fix it asap. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5000 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/TextureDecoder.cpp | 41 +++++++++++--------------- 1 file changed, 17 insertions(+), 24 deletions(-) (limited to 'Source/Core/VideoCommon/Src/TextureDecoder.cpp') diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index 45ebaedbc6..d49633609c 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -88,32 +88,27 @@ int TexDecoder_GetTextureSizeInBytes(int width, int height, int format) return (width * height * TexDecoder_GetTexelSizeInNibbles(format)) / 2; } -u32 TexDecoder_GetTlutHash(const u8* src, int len) +u64 TexDecoder_GetTlutHash(const u8* src, int len) { //char str[40000], st[20]; str[0]='\0';for (int i=0;i> 11) & 0x1F); int red2 = Convert5To8((c2 >> 11) & 0x1F); int colors[4]; + colors[0] = makecol(red1, green1, blue1, 255); + colors[1] = makecol(red2, green2, blue2, 255); if (c1 > c2) { int blue3 = ((blue2 - blue1) >> 1) - ((blue2 - blue1) >> 3); int green3 = ((green2 - green1) >> 1) - ((green2 - green1) >> 3); - int red3 = ((red2 - red1) >> 1) - ((red2 - red1) >> 3); - colors[0] = makecol(red1, green1, blue1, 255); - colors[1] = makecol(red2, green2, blue2, 255); + int red3 = ((red2 - red1) >> 1) - ((red2 - red1) >> 3); colors[2] = makecol(red1 + red3, green1 + green3, blue1 + blue3, 255); colors[3] = makecol(red2 - red3, green2 - green3, blue2 - blue3, 255); } else { - colors[0] = makecol(red1, green1, blue1, 255); // Color 1 - colors[1] = makecol(red2, green2, blue2, 255); // Color 2 colors[2] = makecol((red1 + red2 + 1) / 2, // Average (green1 + green2 + 1) / 2, (blue1 + blue2 + 1) / 2, 255); -- cgit v1.2.3