Fixed texture encoding. Fixes the interaction with objects in Another Code R. Thanks to wordmanwords for the patch.

Fixes issue 5405.
This commit is contained in:
skidau 2012-05-05 11:21:05 +10:00
parent 77f47866df
commit 1587cb3738
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ void WriteIncrementSampleX(char*& p,API_TYPE ApiType)
void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* dest)
{
float result = pow(2.0f, depth) - 1.0f;
float result = 255 / pow(2.0f, (8 - depth));
WRITE(p, " %s = floor(%s * %ff);\n", dest, src, result);
}