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 / How do I get started creating 2D shaders?

Author
Message
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 7th Apr 2021 14:59
I would like to create a solid shader to simulate the look of a CRT-monitor. Or at least, that's my end goal. Right now, I need to figure out the basics! Does anyone have any suggestion on how to get started on this? When I look at even the most basic shader, I just can't grasp the logic.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Apr 2021 16:29 Edited at: 8th Apr 2021 16:29
Thanks, that book is pretty good! I'm still struggling to make head and tail of it all, I don't really has any C experience, so I'm struggling a great deal since I'm missing that fundation. As I understand it, shaders are made up of some generic shader commands, and some commands belonging to AHK2, right?

Here's the result of my first shader:
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Apr 2021 19:38
More shading:
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 8th Apr 2021 21:49 Edited at: 8th Apr 2021 21:50
Looking very good!
The variables are a bit like types and the values are all in the range 0.0 to 1.0.
Interesting fact : The vertex/pixel shaders are run concurrently in multiple threads
I forgot the AppGameKit variables
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Apr 2021 22:23 Edited at: 9th Apr 2021 22:36
Thats looking good basicFanatic
I am not sure if you checked the shader thread it has something similar https://forum.thegamecreators.com/thread/214598 but a great place to see what others have done
where i started was converting shaders from http://glslsandbox.com/ its a great spot to start as you can test the shaders
writing shaders in AppGameKit is a little different so here's a good resource for that https://www.appgamekit.com/documentation/guides/13_shaders.htm

The c languages is much like AppGameKit which i think of AppGameKit as a hybrid (c and basic) the main difference you need to notice is syntax in AppGameKit a=10 is the same as A=10 in c they are treated as 2 different
variables"(case sensitive)shaders are case sensitive as im sure you've discovered by now.


but personally i feel you have done great so far. Keep up the great shader work

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk

Login to post a reply

Server time is: 2024-11-24 03:18:51
Your offset time is: 2024-11-24 03:18:51