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 Classic Chat / Some Shader Help please

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Mar 2019 16:30 Edited at: 1st Mar 2019 16:57
I have a shader that kinda works but the mouse calculations are messed up

Its meant to be a kinda lightning thingy that starts at the centre of the screen and follows the mouse around
but the mouse positioning is kinda wrong.

Was thinking it could perhaps work for somekind of weird game where there are objects around you that you can
kinda destroy by moving the lightning thingy around.

Any suggestions on how I could get the mouse positioning fixed would be greatly appreciated
Thanks in Advance
fubar
puzzler2018
User Banned
Posted: 1st Mar 2019 19:30 Edited at: 1st Mar 2019 19:35
Hi

I think i know what you trying to acheive - but my shader knowlegde is rubbish - i shall take a look more tomorrow.

Maybe just a few mathematic equation commands in wrong places maybe..

But this certainly does bring me an idea of a dynamically shader language viewer - an editor which automatically loads in the shader code, examples from glslsandbox.com and runs it straight away. - but thats for future.
Tier 1 Developer
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 2nd Mar 2019 10:12
Quick fix at line 86~87:
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Mar 2019 15:39 Edited at: 2nd Mar 2019 16:14
Thanks Janbo

Its certainly allot closer than what I had now just wondering how to make it so the length only goes from the centre to the mouse position
perhaps adventually 2 vectors passed one start pos and 2nd mouse pos
fubar
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Mar 2019 13:00
I see:

Also extracted some attributes for you to alter.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 3rd Mar 2019 13:23
Thanks Janbo that's brilliant
just what I wanted
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 3rd Mar 2019 17:50 Edited at: 3rd Mar 2019 18:28
heres kinda what I was thinking still lots to do


collect red squares by colliding with them avoid the green ones
fubar

Login to post a reply

Server time is: 2024-11-23 05:25:50
Your offset time is: 2024-11-23 05:25:50