Handle texture scaling when render res is auto.
Don't use replaceImages for texture scaling = auto.
Merge pull request #5543 from unknownbrackets/texcache

Fix some texture scaling bugs