Page 6 of 15
Re: Textured Polygons for All!
Posted: Tue Jan 29, 2013 6:10 pm
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.
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.
Re: Textured Polygons for All!
Posted: Tue Jan 29, 2013 8:17 pm
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."
the wording and period... how pretentious
Re: Textured Polygons for All!
Posted: Sun Feb 03, 2013 1:51 am
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.
Re: Textured Polygons for All!
Posted: Sun Feb 03, 2013 4:52 am
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!
Re: Textured Polygons for All!
Posted: Sun Feb 03, 2013 6:38 am
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)
Windows 7 under Parallels: (Incorrect, Y-coordinate origin reversed)
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.
Re: Textured Polygons for All!
Posted: Sun Feb 03, 2013 3:38 pm
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.
Re: Textured Polygons for All!
Posted: Mon Feb 04, 2013 9:06 am
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.
Re: Textured Polygons for All!
Posted: Mon Feb 04, 2013 5:47 pm
by xXxMoNkEyMaNxXx
The virtual machine is obviously causing problems, because there are no problems for me on Windows 7.
Re: Textured Polygons for All!
Posted: Mon Feb 04, 2013 10:50 pm
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.
Re: Textured Polygons for All!
Posted: Mon Feb 04, 2013 11:38 pm
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!