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.

Newcomers AppGameKit Corner / 2d shader light normal mapping

Author
Message
Mendo
7
Years of Service
User Offline
Joined: 13th Nov 2016
Location:
Posted: 11th Oct 2019 09:18
Hi everyone,
I followed this example https://forum.thegamecreators.com/thread/212611 but I have a problem and a request:
1) If it is used on win or mac, everything works correctly, but if it is used on mobile the coordinates of positioning of the lights are wrong.
I modified the original shader with at most 2 lights; one for the environment, the other as lighting related to the sprite in motion (android api 5.1 min-sdk is my target and manages at most 2 lights, over the fps collapses).
form:

to

This is because in iOs the for-next cycle causes an incorrect display

2) I would like to create, as a second light, a trapezoidal spotlight able to rotate, is it possible?

Thanks

my Full shader:


My agc Settings:
Ps: As a "Resolution" directive, I tested the coordinates based on the virtual resolution, the sum of the horizontal and vertical GetScreenBounds and the native resolution of the device, but the shader in any case position the lights according to incorrect coordinates (mobile, desktop ok).
Mendo
7
Years of Service
User Offline
Joined: 13th Nov 2016
Location:
Posted: 12th Oct 2019 12:32
point 1, solved:

I change the shader from



to

Login to post a reply

Server time is: 2024-04-20 12:57:46
Your offset time is: 2024-04-20 12:57:46