Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / 2d Shader problem on PC vs IOS ? is it a bug or am i trying something that can't be done

Author
Message
vennis73
7
Years of Service
User Offline
Joined: 12th Sep 2016
Location:
Posted: 14th Dec 2019 20:47
In my shader i require to get the actual position (roughly)

I am using gl_FragCoord for this. It seems that on PC the origin (0,0) is top-left and on IOS the origin is bottom-left ?

I simplified my shader for debugging reasons just to make the pixel red if it matches and green if not. In this case i hardcoded a check on the y position.
And as you can see on IOS it's green at the top, and on PC it's red. The size of the colored parts is not important at this moment.

Took me a while before i understood why my shader wasn't doing what i was trying to do.

I'm new to shaders and just a starter with AGK. Hope someone can explain this to me or tell me what i'm doing wrong.

IOS

PC

Attachments

Login to view attachments
vennis73
7
Years of Service
User Offline
Joined: 12th Sep 2016
Location:
Posted: 15th Dec 2019 10:21
Addition, I first uploaded the code on showcase before i found this (what seems to be an) issue.

project is here
https://forum.thegamecreators.com/thread/225548
vennis73
7
Years of Service
User Offline
Joined: 12th Sep 2016
Location:
Posted: 15th Dec 2019 16:49
I would like to add i got another way to generate a shadow (that was my goal). So it's not an issue for me any more since i worked around it.
Not sure if this topic must be closed or that it's interesting enough to keep open.

Login to post a reply

Server time is: 2024-04-14 04:50:55
Your offset time is: 2024-04-14 04:50:55