Bug #1299

Incorrrect mimap quality on some shapes.

Added by Naush over 7 years ago. Updated over 7 years ago.

Status:New Start date:05/22/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:NeL: General
Target version:-

Description

Way to reproduce :
Add a shape to an IG, and add an entity with at least one shared texture.
put the observer near the IG shape to see mipmap 0 or 1, and put the entity far enough to see it at mipmap 5 or 6
basically the Fairhaven stable (Gen_Bt_Ecurie.ig & Gen_Bt_Silo.shape share G_tower2.tga)

What's going wrong ?
Ig shape texture is initialized first at maximum resolution, then the entity texture is initialized at a low level (3). Sometimes, after a while, AsyncManager re-upload an high resolution texture.
They are now sharing the same driverPtr ! but, IG shape never degrade there texture, where entities does.
Now if you are moving near the entity, texture will be re-uploaded with the highest quality, and if you move away, a low resolution texture will be reloaded.
And of course if you go back to IG/shape, you have a ugly texture.

A fix ?
Separate pool of sharedPtr using allowDegradation() seems to work :)

driver.cpp:297
void IDriver::getTextureShareName (const ITexture& tex, string &output)
{
      ...
    if (tex.allowDegradation())
        output+= "@D:On";
    else
        output+= "@D:Off";
}

Hope this help !

History

#1 Updated by rti over 7 years ago

related to #1214 ?

#2 Updated by Naush over 7 years ago

Well it's hard to say, but the effect is the same. at least it's not related to #938.

Also available in: Atom PDF