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.
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.
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?
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 ^_^
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.
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
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.
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 ^_^
I've created another version (attached) that passes raw code to the shader, rather than letting LÖVE create the code.
I'd appreciate if you can test it and tell me the error message(s) you get. I'd expect the line numbers to be lower in this case. The attached program works in my desktop and in my Android phone. This should narrow down whether the issue is in the LÖVE side or in the phone side.
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.
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 ^_^
I've created another version (attached) that passes raw code to the shader, rather than letting LÖVE create the code.
I'd appreciate if you can test it and tell me the error message(s) you get. I'd expect the line numbers to be lower in this case. The attached program works in my desktop and in my Android phone. This should narrow down whether the issue is in the LÖVE side or in the phone side.
hi just came across this thread, good stuff, although the most recent .love you uploaded gives me
Error
Cannot link shader program object:
ERROR: Error: Linking ES shaders with non-ES shaders is not supported.
Traceback
[C]: in function 'newShader'
main.lua:46: in function 'newRawShader'
main.lua:69: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
keep at it
Last edited by tlcarus on Tue Sep 25, 2018 11:40 pm, edited 2 times in total.
Thanks for the heads-up. The last one was just a test for 4aiman to check if it works in their mobile phone, to try to narrow down their problem, but it's good to know there's a hardware in which it doesn't work. What are your specs? Mobile, desktop? Which OS/graphics card?
Please refer to rctest2rctest3 for the latest working example.
Cannot link shader program object:
Error: shader version mismatch
Traceback
[C]: in function 'newShader'
main.lua:46: in function 'newRawShader'
main.lua:69: in function 'load'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
I also ran some older demos agains the latest apk and...
4aiman wrote: ↑Thu May 17, 2018 6:05 pm
Sorry for the delay. Haven't been able to test this stuff earlier.
I dont' know how to name the issue let alone properly report it.
No worries. Thanks for the video.
That looks to me like the projected floor is just off the screen. According to the video, only 8x6 tiles are visible, and this is what happens when I trim it to 8x6 tiles:
Flip.gif (150.89 KiB) Viewed 5757 times
I didn't put any effort in adjusting it for any screen size, so that's unfortunate but not unexpected.
From your words in past posts, my impression was that you got errors compiling *any* shader of any kind; however, that one has obviously compiled without problems, and it is even very likely that it's working fine and you were just out of luck with the screen size.