Textured Polygons for All!

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

xXxMoNkEyMaNxXx wrote: I was upset because my uber-efficient code (at least in my eyes) had been butchered. You can obviously do whatever you want, but I can only hope that you will be efficient. :P
Enjoy the new screw driver but don't screw anything up.
I prefer using a simple library (yes, localized).
I can reload the effect at any time by sampling doing texture.load()
The problem with PixelEffects is that it is still a black box for me - can only determine what it does by prodding it.
Am awaiting someone to write a tut on exactly how to program in Love's version of GLSL.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Textured Polygons for All!

Post by xXxMoNkEyMaNxXx »

I learned how to do write in glsl effect language in one day. I also have alot of experience with vectors 'n' stuff, so it will probably not be as easy without that experience. Just make the Lua side first, then try things out.

Edit Aug 2019
"Enjoy the new screw driver but don't screw anything up." perfect summary of sensitive 2013 monkeyman
"I learned how to do write in glsl effect language in one day." :ehem: the wording and period... how pretentious
Last edited by xXxMoNkEyMaNxXx on Tue Aug 27, 2019 5:50 am, edited 1 time in total.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

Just an anecdote. My friend is helping me test my engine on an old laptop he's been borrowing. It has an ATI graphics card, but works with the LuaJIT version fine.. except for this odd bug with texturing...



The image shows up fine.... except for the weird crazy effect that occupies the solid colored background. (The images have transparent pixels. The transparent pixels are where the effect shows up.) This colored background is being drawn by the module itself. So the problem lies in the module. If I had to guess, it might be a weird incompatibility with PixelEffects or something?

Soooo weird.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Textured Polygons for All!

Post by xXxMoNkEyMaNxXx »

That, is weird. Because of the fact that it works on some systems, I would suspect that it's a semi-compatibility issue. I wouldn't know where to start to fix it! :?
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

I know! It's weird! But it's only transparent pixels, so I can work around it by just making my images opaque apparently. (He didn't have a problem in the early version I sent me because I used a placeholder solid image.)

But that's a sad limitation. I wonder if it does it with 100% opaque textured polygons too. Right now all I use is ones with a solid color as the "background color." And that's there the problem pixels occur.

I tried looking at your code and I have no idea where to start and what determines what returns the default color when the image has no color at that position.

Edit: And now I found an even weirder bug on Windows on my own machine! I hadn't tested my own project in my own computer in Windows until now. But the texture coordinates seem to be flipped on the Y axis on my Windows 7 in Parallels on a MacBook Air. (GPU = Intel HD 4000, passed as Parallels Display Adapter)

So many bugs every time I turn around! lol

OS X: (Correct)
Image

Windows 7 under Parallels: (Incorrect, Y-coordinate origin reversed)
Image

Windows on older machine: The video above (Correct alignment, bad pixel output)

I really wish I had some various older machines, both PC and Mac, with assorted specs and 0.8.x on I can use for testing.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

Please post a simple demo that only has a single object that displays the problems and provided an image of what you want.
I'm sure the community will gladly test it for you - so we can see how much of a problem this is.
Edit:
Threw together a test of using a texture containing portions of which are transparent.
May not be what you are doing but I don't have any problems with it???
Please ignor if I'm way off base on this.
Attachments
texture_with_transparency.love
Star has transparent background.
(380.18 KiB) Downloaded 157 times
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

Yeah, it's doing it on yours too. Your star rotates counter-clockwise, but on Windows 7 under Parallels (For me) it rotates clockwise and you see the hidden cropped edges as it turns. The background is fine because it's not rotating. It's also not upside down or anything. That's where the problem lies. It is easier to show when you don't center everything.

I'll toss together a simple "3D Textured Model Tester" to use as a demo that people here can try out and post their results.

To clarify, there's two bugs I am experiencing on Windows 7 only:

1) Transparent background pixels are replaced with somewhat random gibberish colors. But the image paints fine over them. Workaround: Currently just use non-transparent images.

2) On other system, rotations are done in reverse.
User avatar
xXxMoNkEyMaNxXx
Party member
Posts: 206
Joined: Thu Jan 10, 2013 6:16 am
Location: Canada

Re: Textured Polygons for All!

Post by xXxMoNkEyMaNxXx »

The virtual machine is obviously causing problems, because there are no problems for me on Windows 7.
User avatar
Jasoco
Inner party member
Posts: 3727
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

xXxMoNkEyMaNxXx wrote:The virtual machine is obviously causing problems, because there are no problems for me on Windows 7.
I'm thinking that. But it only happens in this project. I have dozens of games that all work fine.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

xXxMoNkEyMaNxXx wrote:The virtual machine is obviously causing problems, because there are no problems for me on Windows 7.
The plot thickens!
I'm on Windows 7 and have Jasoco's problems. NO!
Edit: NOT a problem on Windows 7 - my error!
Last edited by Ref on Tue Feb 05, 2013 2:28 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests