mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 15:15:40 +00:00
Texture mipmaps must be at least 2x2
Fixes sky in Dirt Devils
This commit is contained in:
parent
3cf8a1fa94
commit
2b186e688c
|
@ -210,7 +210,7 @@ vec4 texBiLinear(usampler2D texSampler, ivec2 wrapMode, vec2 texSize, ivec2 texP
|
|||
vec4 GetTextureValue()
|
||||
{
|
||||
float lod = mip_map_level(fsViewVertex);
|
||||
float numLevels = floor(log2(min(float(baseTexInfo.z), float(baseTexInfo.w)))); // r3d only generates down to 1:1 for square textures, otherwise its the min dimension
|
||||
float numLevels = floor(log2(min(float(baseTexInfo.z), float(baseTexInfo.w)))) - 1.0; // r3d only generates down to 2:2 for square textures, otherwise its the min dimension
|
||||
float fLevel = clamp(lod, 0.0, numLevels);
|
||||
|
||||
int iLevel = int(fLevel);
|
||||
|
|
Loading…
Reference in a new issue