Page 2 of 2

Re: Texturing Meshes at an Angle

Posted: Wed May 24, 2017 9:12 pm
by Davidobot
MasterLee wrote: Tue May 23, 2017 6:30 pm Finally i found an solution to render trapezoid
Then in the fragment shader i divide s by p
Could you post a .love file to showcase this?

Re: Texturing Meshes at an Angle

Posted: Thu May 25, 2017 12:34 pm
by MasterLee
Press ↑,↑,→ to go to the actual experiment.
Next i will try to do the same with Quadrilateral but it will be hard math.

Re: Texturing Meshes at an Angle

Posted: Fri May 26, 2017 6:53 am
by Jasoco
MasterLee wrote: Tue May 23, 2017 6:30 pm Finally i found an solution to render trapezoid
Bildschirmfoto von »2017-05-23 20-26-04«.png
i used following data: (x,y)(s,t,p)

Code: Select all

             ((-1,-1),(0,0,1)),
             ((-.1,+1),(0,1,.1)),
             ((+1,-1),(1,0,1)),
             ((+.1,+1),(.1,1,.1)),
Then in the fragment shader i divide s by p
The problem is it's still not perspective. Note that the squares at the "far" top end are still the same height as the ones at the "close" bottom end.

Re: Texturing Meshes at an Angle

Posted: Fri May 26, 2017 10:39 am
by MasterLee
Jasoco wrote: Fri May 26, 2017 6:53 am The problem is it's still not perspective. Note that the squares at the "far" top end are still the same height as the ones at the "close" bottom end.
I did the non perspective on purpose because it is more difficult and was the one i wanted.
Perspective quad would be easier.
That was not what i wanted:
Bildschirmfoto von »2017-05-26 12-52-03«.png
Bildschirmfoto von »2017-05-26 12-52-03«.png (50.67 KiB) Viewed 5884 times
I wanted the following:
Bildschirmfoto von »2017-05-26 12-52-09«.png
Bildschirmfoto von »2017-05-26 12-52-09«.png (51.56 KiB) Viewed 5884 times
Btw.: What about an if CGA Cards have 3D acceleration jam

Re: Texturing Meshes at an Angle

Posted: Sun May 28, 2017 3:48 am
by therektafire
from the cpml github page
Clone the repository and require it, or if you prefer luarocks: $ luarocks install --server=http://luarocks.org/dev cpml. Add --tree=whatever for a local install.
How exactly does one require a git repo in a lua script -_- Do I require the /modules directory?

Re: Texturing Meshes at an Angle

Posted: Mon May 29, 2017 3:33 pm
by Davidobot
MasterLee wrote: Fri May 26, 2017 10:39 am Perspective quad would be easier.
That was not what i wanted: <what Jasoco and I want>
Is it just me, or is something off about how it stretches things? Like the bottom is too stretched out. This is how it would look like in a proper perspective way (using pers.lua)
Image

Re: Texturing Meshes at an Angle

Posted: Mon May 29, 2017 6:13 pm
by MasterLee
Davidobot wrote: Mon May 29, 2017 3:33 pm Is it just me, or is something off about how it stretches things? Like the bottom is too stretched out. This is how it would look like in a proper perspective way (using pers.lua)
It is just you:

You have 16:9 i have 4:3 screen aspect ratio.
Furthermore the upper part of your quad seems to have an depth of 9 while mine has an depth of 10. (Assumed that both start at depth 1)
That is why mine shows so stretched, it is simply not the same viewing angle and position.

Also you Texture has 19 rows where mine has only 16

Re: Texturing Meshes at an Angle

Posted: Sat Mar 17, 2018 5:21 pm
by 4aiman
Sorry for necroposting, but is there a version that works on Android build of love2d?