The ResourceDataReader block pool currently will create a duplicated block if you read a derived type after a base type at the same position.
Considering https://github.com/carmineos/gta-toolkit/commit/81e55a04062cc5df1309c38dd0724b78c1974dd9 :
Reading the shader parameters first will add the Texture Data blocks to the pool.
If the ShaderGroup has an embedded texture dictionary it will also read blocks of type TextureDX11 (which derives from Texture ) which are the same blocks and so they are at the same position in the resource.
At this point it will create a duplicated object as the cached one is not of type TextureDX11 but a base Texture. The block pool should replace the block with the most derived one but also somehow update all the blocks which referenced to the old one to now reference the replaced one.
The ResourceDataReader block pool currently will create a duplicated block if you read a derived type after a base type at the same position.
Considering https://github.com/carmineos/gta-toolkit/commit/81e55a04062cc5df1309c38dd0724b78c1974dd9 : Reading the shader parameters first will add the
Texture
Data blocks to the pool. If the ShaderGroup has an embedded texture dictionary it will also read blocks of typeTextureDX11
(which derives fromTexture
) which are the same blocks and so they are at the same position in the resource. At this point it will create a duplicated object as the cached one is not of typeTextureDX11
but a baseTexture
. The block pool should replace the block with the most derived one but also somehow update all the blocks which referenced to the old one to now reference the replaced one.