Announcements
The Scaleform forum is now read-only. Please head to the Gamedev site for product support.
Scaleform Forum (Read Only)
Scaleform enables developers to leverage the power of the Adobe® Flash® tool set to create powerful user interface environments for video games.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Texture flipped and mirrored

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
wesleyhuang
815 Views, 6 Replies

Texture flipped and mirrored

I use ReplaceTexture,

But the Texture will flipped and  mirrored.

4.jpg

Can Help me the problem? Thanks.

 

 

P.S. I remember when i use last version not fix the new version. is correct.

6 REPLIES 6
Message 2 of 7
wesleyhuang
in reply to: wesleyhuang

 

 

I Use The SF sample,is the same issue..

orgin.png

 

https://autodesk.app.box.com/s/cahanm463luoy7fjpfj3 

Message 3 of 7
andyBP
in reply to: wesleyhuang

Message 4 of 7
adam.petrone
in reply to: andyBP

Hello,

 

How are you loading Testure01? I assume it's something like this:

 

Texture texture = Resources.Load("image") as Texture2D;

 

 

Are you seeing this problem with Direct3D or OpenGL ? If it's one or the other, the problem is likely due to to an incorrect origin assumption. So the resulting image is flipped vertically on one, but correct on the other.

 

In the ReplaceTextureDemo, the images are read in and cached. When doing so, however, the image is flipped vertically. This could be a workaround you can implement.

Message 5 of 7
wesleyhuang
in reply to: adam.petrone

hi adam

 

certainty use  Texture texture = Resources.Load("image") as Texture2D; to load a texture and use replacetexture

 

but i not see any error or log.

 

the result still flipped and  mirrored.

 

ReplaceTextureDemo is same too.

 

Message 6 of 7
wesleyhuang
in reply to: wesleyhuang

p.s.  In flash's png texture size is 512x512

        In unity Resources.Load 's Texture is 512x512 png Texture too

Message 7 of 7
adam.petrone
in reply to: wesleyhuang

Hello wesley,

 

In the ReplaceTextureDemo, I'm referring to this snippet of code:

 

 

OriginalTextures[i] = new Texture2D(width, height);

for (int j = 0; j < width; j++)
{
    for (int k = 0; k < height; k++)
    {
        OriginalTextures[i].SetPixel(j,k, tmp.GetPixel(j, height - k-1));
    }
}
OriginalTextures[i].Apply();

This should function as a workaround until we can investigate a fix internally.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report