Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: nespcbuild on March 05, 2018, 07:30:14 PM

Title: Snaps are playing upside down
Post by: nespcbuild on March 05, 2018, 07:30:14 PM
These mp4 snaps play fine on my pi but when I decided to set up AM on my windows 8 tablet, all of the snaps are playing upside down. If I play them on the tablet in wmp or vlc, they're right-side up. It's not happening with every layout. For example, Attrac-Man is fine but Robospin is playing the snaps upside down. Is there a way to edit the nut file to flip the upside down snaps back to right side up? If not, is there some other way to fix this? I searched but couldn't find any posts about this.
Title: Re: Snaps are playing upside down
Post by: nespcbuild on March 20, 2018, 05:52:47 AM
Is there any way to just flip/invert the snaps in the .nut file?
Title: Re: Snaps are playing upside down
Post by: progets on March 20, 2018, 12:37:58 PM
Robospin is popular and its code doesn't position the snaps upside down. It sounds like you might have a modified copy of Robospin (there are a lot of them). I would try downloading the original Robospin theme from here http://forum.attractmode.org/index.php?topic=481.msg3331#msg3331 (http://forum.attractmode.org/index.php?topic=481.msg3331#msg3331) and see if you still have the issue. If you still have issues post your layout.nut so we can see it.

BTW - Yes a layout.nut can rotate the snaps.
Title: Re: Snaps are playing upside down
Post by: qqplayer on March 20, 2018, 02:11:49 PM
If only the snap is "rotated" just look into the layout.nut

Code: [Select]
local snap = fe.add_artwork( "snap", flx*0.2, fly*0.835, flw*0.368, flh*0.88);
snap.rotation = -90;

Maybe is a bit diferent in your layout but is always the same thing.
Jsut try with "90" "-90" ...
Title: Re: Snaps are playing upside down
Post by: nespcbuild on April 24, 2018, 03:23:32 PM
Thanks for the suggestions guys. I'll give them a try and see if they work. The theme works fine on my other windows machine but the one with the upside down issue is a tablet with a pretty funky/weak graphics chip so I'm thinking I just might have to edit the code for the theme to make it work on the tablet. Other themes that work fine on my other machines are also playing the vids upside down on the tablet.
Title: Re: Snaps are playing upside down
Post by: Oomek on May 18, 2018, 06:46:38 AM
You can add a default shader and change the following line:
Code: [Select]
vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);To
Code: [Select]
vec4 pixel = texture2D(texture, vec2(gl_TexCoord[0].x, 1.0 - gl_TexCoord[0].y));
Or if your theme already binds a shader find that line and replace it as well.