Why faking 3D nowadays?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
pgimeno
Party member
Posts: 1008
Joined: Sun Oct 18, 2015 2:58 pm

Re: Why faking 3D nowadays?

Post by pgimeno » Wed Apr 04, 2018 8:44 pm

Davidobot wrote:
Wed Apr 04, 2018 8:07 pm
While your matrix that works is:

Code: Select all

{
     1.3,    0,  0,  0,
       0,    0,  1,  1,
       0, -1.7,  0,  0,
    -450, -120, 50, 50,
  }
Ahh, okay, I get it now. You're referring to the first demo. In the first demo I didn't follow any particular convention, I just played with the distance, height and a 90° rotation until I got the image visible. I can't remember how exactly I generated it, but probably the Z rotation is eliminated and there's some Y and Z displacement (or X and Z). I'm not even sure how Löve generates the geometry; it's probably a rectangle on X and Y with Z=0 but I didn't care that much.

In the second demo, I paid close attention to being consistent in my conventions for the axes and the rotations I was applying, so that everything made sense. If you want to know what you're doing, I suggest you use the second demo as a basis, placing the objects in 3D coordinates that you have full control of.

User avatar
4aiman
Party member
Posts: 229
Joined: Sat Jan 16, 2016 10:30 am

Re: Why faking 3D nowadays?

Post by 4aiman » Sun Apr 08, 2018 11:36 am

Wow! So many examples and even demos :)
Too bad neither one works on my Android device the way it does on Linux Desktop.
Seems strange that Adreno530 is incapable to understand the shaders.
But I want to thank you for your time anyway.
Maybe I'll try to target desktop first and then sort it out for Android.

Regards!

User avatar
pgimeno
Party member
Posts: 1008
Joined: Sun Oct 18, 2015 2:58 pm

Re: Why faking 3D nowadays?

Post by pgimeno » Sun Apr 08, 2018 2:21 pm

4aiman wrote:
Sun Apr 08, 2018 11:36 am
Wow! So many examples and even demos :)
Too bad neither one works on my Android device the way it does on Linux Desktop.
What's wrong with it? Does any program that uses hardware-accelerated 3D work in that device at all, like, say, Minetest?

User avatar
4aiman
Party member
Posts: 229
Joined: Sat Jan 16, 2016 10:30 am

Re: Why faking 3D nowadays?

Post by 4aiman » Mon Apr 16, 2018 9:26 pm

It gives me errors on lines 54, 55 95 etc.
"Wrong operand types", "no matched overloaded function found" for "sqrt" invocation etc.

I haven't had any issues with any 3d app until I tried to use some shaders in love2d on Android.
Anyway, what does Minetest have to do with love2d or shaders? When I checked last time, mobile version had broken shaders on mobile devices.
If you want exact error message I'm getting - feel free to ask ^_^

User avatar
pgimeno
Party member
Posts: 1008
Joined: Sun Oct 18, 2015 2:58 pm

Re: Why faking 3D nowadays?

Post by pgimeno » Mon Apr 16, 2018 10:58 pm

4aiman wrote:
Mon Apr 16, 2018 9:26 pm
It gives me errors on lines 54, 55 95 etc.
"Wrong operand types", "no matched overloaded function found" for "sqrt" invocation etc.

I haven't had any issues with any 3d app until I tried to use some shaders in love2d on Android.
Ah, okay. So I guess even the default shader errs out.

Code: Select all

love.graphics.setShader(love.graphics.newShader[[
vec4 position(mat4 transform_projection, vec4 vertex_position)
{
    // The order of operations matters when doing matrix multiplication.
    return transform_projection * vertex_position;
}
]])
(from https://love2d.org/wiki/love.graphics.newShader)

If so, that would be a compatibility problem with the internal code added by Löve to the shader. Maybe the developers are interested, in case you feel like helping.

4aiman wrote:
Mon Apr 16, 2018 9:26 pm
Anyway, what does Minetest have to do with love2d or shaders? When I checked last time, mobile version had broken shaders on mobile devices.
Never mind that. I misunderstood where the issue was.

4aiman wrote:
Mon Apr 16, 2018 9:26 pm
If you want exact error message I'm getting - feel free to ask ^_^
I'm curious to see it. If you want to file an issue in the issue tracker, that information will be valuable in tracking it down. https://bitbucket.org/rude/love/issues

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests