Page 9 of 15

Re: Textured Polygons for All!

Posted: Thu Mar 21, 2013 1:45 am
by Jasoco
Ahh, textured triangles. Who will come up with them first? MoneyMan or 0.9.0? I am eager to find out.

Re: Textured Polygons for All!

Posted: Thu May 09, 2013 7:37 pm
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.

Re: Textured Polygons for All!

Posted: Thu May 09, 2013 9:05 pm
by Jasoco
Works fine for me. Then again I've noticed this library works differently and sometimes incorrectly on certain machines.

Re: Textured Polygons for All!

Posted: Fri May 10, 2013 7:14 pm
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.

Re: Textured Polygons for All!

Posted: Fri May 10, 2013 7:37 pm
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.

Re: Textured Polygons for All!

Posted: Fri May 10, 2013 8:02 pm
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. :)

Re: Textured Polygons for All!

Posted: Fri May 10, 2013 8:59 pm
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.

Re: Textured Polygons for All!

Posted: Sat May 11, 2013 2:50 pm
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.

Re: Textured Polygons for All!

Posted: Sat May 11, 2013 6:51 pm
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.

Re: Textured Polygons for All!

Posted: Sat May 11, 2013 8:53 pm
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.