mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- use texture clamping for skies, because these textures do not always wrap.
This commit is contained in:
parent
39e32d560c
commit
5fa879d5d1
3 changed files with 3 additions and 2 deletions
|
@ -116,6 +116,7 @@ enum {
|
|||
|
||||
DAMETH_CLAMPED = 4,
|
||||
DAMETH_MODEL = 8,
|
||||
DAMETH_SKY = 16,
|
||||
|
||||
DAMETH_WALL = 32, // signals a texture for a wall (for r_npotwallmode)
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
|
|||
static int32_t skyzbufferhack_pass = 0;
|
||||
if (flatskyrender && skyzbufferhack_pass == 0)
|
||||
{
|
||||
polymost_flatskyrender(dpxy, n, method, tilesize);
|
||||
polymost_flatskyrender(dpxy, n, method|DAMETH_SKY, tilesize);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int
|
|||
auto mtex = LoadTexture(tex, TextureType, lookuppal);
|
||||
if (mtex)
|
||||
{
|
||||
auto sampler = (method & DAMETH_CLAMPED) ? (sampleroverride != -1 ? sampleroverride : SamplerClampXY) : SamplerRepeat;
|
||||
auto sampler = method & DAMETH_SKY? SamplerClampXY : (method & DAMETH_CLAMPED) ? (sampleroverride != -1 ? sampleroverride : SamplerClampXY) : SamplerRepeat;
|
||||
if (TextureType == TT_INDEXED) sampler = sampler + SamplerNoFilterRepeat - SamplerRepeat;
|
||||
|
||||
BindTexture(0, mtex, sampler);
|
||||
|
|
Loading…
Reference in a new issue