Download

UTexture2D eroded then gets good - mipmap problem?

Hi,

I am feeding a screengrab stream into a texture using UpdateTextureRegionsand am getting some unwanted blurring.
The texture looks blurry or solarized/eroded at first, then if I go in and just slightly move the camera around, the textures get better.

Like this (first the left one then the right one)

I am doing this in code and was wondering if it could be the mip mapping that is giving me this unwanted effect?
Can I somehow turn off mip mapping for a UTexture2D??

Cheers

Is this texture in a material? If so, you can set MipMaps to reference “MipBias” in your material then set a constant for the MipBias. -1 should probably do the trick.

Also, you might check your engine scalability settings for textures. If it’s low, you’ll probably end up with a lot of texture blurring.

Hi! …yes I connect a runtime generated texture to a instance of a completely basic shader with everything off but the texture coming into Emissive Color.
My texture settings are on ‘Epic’.
I tried with the MipValueMode->MipBias = -1. This is on a TextureSampleParameter2D. No difference unfortunately.

I was reading up more and started to set the variables I suspected would help me but still no difference at all!
Would anyone be able to give me a hint if any of this should work or not? Do I have to do this in a special place or something?


mTexture->Filter = TextureFilter::TF_Nearest;
mTexture->NeverStream = true;
mTexture->DeferCompression = true;
mTexture->CompressionNone = true;
mTexture->MipGenSettings = TMGS_NoMipmaps;
mTexture->LODGroup = TEXTUREGROUP_Cinematic;
mTexture->NumCinematicMipLevels = 1;
mTexture->LODBias = -5; // and 0 and 5

(I tried mTexture->UpdateResource(); after as well)

It still looks eroded even when rendered pixels are ‘larger’ than the source pixels. Still eroded.
And I think it is weird that the rendered texture in the frame changes after I Pause the game ‘playback’…

Aha I found it!
It was the TemporalAA that was the culprit!
When I turn off AA altogether OR just change the method to FXAA the problem goes away and the texture look like I would expect it to.
No more strange erosion or weird over time changes.
(Not sure why an AA method would degrade a texture that much, but it does)

Cheers