Textured Polygons for All!

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

Ahh, textured triangles. Who will come up with them first? MoneyMan or 0.9.0? I am eager to find out.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

Thought I might be able to create shadows with 'Textured Polygons for All' but the shader doesn't handle transparency correctly.
Areas that are transparent are converted to white.
Anyway around this?
Object is to end up with a gray shadow of a figure (from an image) on a plane that could be placed next to the displayed image.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

Works fine for me. Then again I've noticed this library works differently and sometimes incorrectly on certain machines.
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 »

It's most likely that the current colour is not 255,255,255,255. This is strange because my shader has no dependencies on the current colour if I can recall correctly. As for textured triangles, there's not enough information to make a perspective, but I could easily make it just look bad.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

Academic, as this is the only shader that I can't get to work (now) on Love 0.9.0 - just get the "white-screen-of-death" and no error meaasges.
Seem strange that 'there's not enough information to make a perspective' since OpenGL doesn't seem to have any problems with texturing triangulated geometries.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Textured Polygons for All!

Post by slime »

Ref wrote:Academic, as this is the only shader that I can't get to work (now) on Love 0.9.0 - just get the "white-screen-of-death" and no error meaasges.
Well, good thing Geometry exists in 0.9.0 then. :)
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

slime wrote:
Ref wrote:Academic, as this is the only shader that I can't get to work (now) on Love 0.9.0 - just get the "white-screen-of-death" and no error meaasges.
Well, good thing Geometry exists in 0.9.0 then. :)
Can you post a sample code for using this with an image? I want to do some playing around in preparation. But I don't really understand how to use it yet.
User avatar
Ref
Party member
Posts: 702
Joined: Wed May 02, 2012 11:05 pm

Re: Textured Polygons for All!

Post by Ref »

Can you post a sample code for using this with an image? I want to do some playing around in preparation. But I don't really understand how to use it yet.
Sure would be nice!
Haven't been able to guess how Geometry works with an image.
Just get dark shape so far.
Only got the attachment to work so far.
Attachments
geotest9.love
vertex shading
(587 Bytes) Downloaded 166 times
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Textured Polygons for All!

Post by Jasoco »

Ref wrote:
Can you post a sample code for using this with an image? I want to do some playing around in preparation. But I don't really understand how to use it yet.
Sure would be nice!
Haven't been able to guess how Geometry works with an image.
Just get dark shape so far.
Only got the attachment to work so far.
Doesn't work for me on the pre-release I have. Gives me an error "attempt to call field 'newGeometry' (a nil value)" on line 22. Is there a newer version than what I have? Would be nice if the build number was put in each Löve version so we can tell when a build we have is too old.

Mine says it was created April 5th.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Textured Polygons for All!

Post by slime »

Jasoco wrote:
Ref wrote:
Can you post a sample code for using this with an image? I want to do some playing around in preparation. But I don't really understand how to use it yet.
Sure would be nice!
Haven't been able to guess how Geometry works with an image.
Just get dark shape so far.
Only got the attachment to work so far.
Doesn't work for me on the pre-release I have. Gives me an error "attempt to call field 'newGeometry' (a nil value)" on line 22. Is there a newer version than what I have? Would be nice if the build number was put in each Löve version so we can tell when a build we have is too old.

Mine says it was created April 5th.
Here is an OS X build from today: https://dl.dropboxusercontent.com/u/421 ... sx-pre.zip
Nearly every existing love game won't work with 0.9.0 without some function call name changes, partly because the window functions in love.graphics got moved to love.window yesterday.

There are still some issues with Geometries that may or may not be solved by the time 0.9.0 is released: in order to support concave polygons, it performs polygon triangulation internally to convert the polygon into individual triangles, but as a result the color and texture coordinate interpolation might not always behave as expected.
Post Reply

Who is online

Users browsing this forum: No registered users and 151 guests