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 Showcase / App Shader Kit (3D Shader Pack)

Author
Message
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 27th Jan 2018 18:01 Edited at: 27th Jan 2018 18:03
Hey Janbo,

Any sort of transparency effect? I tried to use the one native to AppGameKit, but it seems to be dependent on where the camera is located.

All have the same transparency and same alpha - but the ones in the middle are barely transparent


yet when I move to a different location more change to barely transparent

Attachments

Login to view attachments
Bengismo
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 27th Jan 2018 19:01 Edited at: 27th Jan 2018 19:01
Is your grass/ground object also semi transparent?
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 27th Jan 2018 19:31
@Bengismo

Yes, the grid is transparent.
Bengismo
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 27th Jan 2018 19:37
You have a transparency sorting issue id bet.

Basically, transparent objects arent written to the depth buffer and so draw order becomes important. Some objects have the grid on top of them and some have it under them.

An option is to set the grid to invisible and manually draw it usibg drawobject before each sync. In other words manually controlling your draw order.
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 27th Jan 2018 20:50 Edited at: 27th Jan 2018 20:51
You were right. I adjusted the gridshader to include the diffuse on my ground and added an emissive light to it. to give a slight color change. Its working now.


Thanks! That was aggravating me. I know it was something I didn't understand.

Attachments

Login to view attachments
GarBenjamin
1
Years of Service
Recently Online
Joined: 30th Nov 2016
Location: USA
Posted: 27th Jan 2018 22:46 Edited at: 27th Jan 2018 22:46
Awesome I see you released this while I was away. Just purchased it through Steam (since that is where I bought App Game Kit and the other DLC).

I'm guessing these shaders won't do anything for sprites only 3D objects? If that is so do you have any plans on making a bunch of shader fx for 2D sprites (fire, ice, stone, outline, blur, glow, etc)?

I will have to create some cubes and experiment with these later.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 27th Jan 2018 23:30 Edited at: 27th Jan 2018 23:32
Yes this pack is only for 3D objects but some of the fullscreen shaders might be abusable for sprites.
I'm toying with the idea of creating a 2D shader pack in the future.
How is ice and stone special why do you need a shader for it ? I can imagine ice maybe has some flares or even refraction/reflections (from somewhere) but stone
GarBenjamin
1
Years of Service
Recently Online
Joined: 30th Nov 2016
Location: USA
Posted: 28th Jan 2018 00:46 Edited at: 28th Jan 2018 07:13
Well when it comes to shader fx the only limit is imagination. You could truly make a hundred of them for 3D and 2D I think.

Here is one of, if not the, best packs for Unity




I've seen a stone shader fx someplace as well. It basically turns the image into grayscale with increased contrast and I think it had some light glistening going on IIRC.

But anyway those videos above may give you some ideas.

Anything you can create that we can just plop in is a very good thing. Make plasma, noise, teleportation, poisoned, covered in blood, wavy fx fading in and out like it is caught between this realm and another, one that has dots / stars glistening all over the image (for powering up, etc) and so forth. I think others would like this kind of thing as well.

Anyway, I think it is awesome you are doing these! Thanks a lot! Much appreciated. And don't take those videos the wrong way I greatly prefer AGK2 over Unity. I could never connect with that. AGK2 is ideal and with you powering it up even more with cool shaders... we will see some very cool looking games coming out next year or so I think!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Richard_6
1
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 28th Jan 2018 12:47
A package of 2d shaders would be really awesome!
basicFanatic
User Offline
Joined: 7th Jun 2017
Location:
Posted: 1st Feb 2018 10:49
Hey, now that Ron lets us render left and right eye individually, do you think you can get the shaders to play along with VR? (I have no clue whatsoever how much work this would be)
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Feb 2018 13:13
I already looked into it but as I have no VR device my self I have not much time to test/work on it.
Ron Erickson
Moderator
15
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 1st Feb 2018 13:52
Quote: "Hey, now that Ron lets us render left and right eye individually, do you think you can get the shaders to play along with VR? (I have no clue whatsoever how much work this would be)"


That was the intent! Unfortunately, I don't really have time to play with the shaders at the moment. I currently have a crazy work schedule that is keeping me from working on the fun stuff! If you get time to try it out, basicFanatic, let me know if there is anything else needed on the VR side of things!

Ron
a.k.a WOLF!
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Feb 2018 14:05 Edited at: 1st Feb 2018 14:10
@Ron: We should definitely stick our heads together again and make it work someday

In the meantime I can tease you with Screen Space Reflections for the next version

Attachments

Login to view attachments
basicFanatic
User Offline
Joined: 7th Jun 2017
Location:
Posted: 1st Feb 2018 15:30
Too bad! I could do the testing, but that would be quite a bothersome workflow!

Or maybe you could send the left and right image to a pair of planes, so you can see them on the monitor:
+ Code Snippet
Ron Erickson
Moderator
15
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 1st Feb 2018 15:49
Well, I do think all the commands are available. So, it might not be a matter of testing as much as it is a matter of just using them! All it will probably take is someone that is interested enough in trying it out to confirm that it is working!
a.k.a WOLF!
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 3rd Feb 2018 21:22
Hi janbo,
Could you please give me a help about the SP_ColorGrading_SetLookUpTable(Lut[1].ImageID,Lut[2].ImageID) function?
Why there is a second image handler?
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Feb 2018 22:56 Edited at: 3rd Feb 2018 22:57
Sure:
The color grading effect can transition from the first look up table to the second using SP_ColorGrading_SetFade(Fade#)
Pass a Value from 0 to 1 (0 being the first LUT and 1 being the second LUT)
The ColorGrading Demo shows how you can interpolate between multiple LUT's using AGK's Custom Tween Values.
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 4th Feb 2018 00:41
Thank you
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 4th Feb 2018 02:11
any trick to get better result with toon render and also setup glow object effect like tron? thanks
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Feb 2018 11:57
Can you ask that more specific ?
You want a combination of toon and glow ?
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 4th Feb 2018 12:27
Sorry, im asking for two different thing.

1. Toon shader, im only getting small highlight on my character. Is there any control it and lighting direction?
2. Ive seen the illumination and glow sample, but i dont find what im looking for.

Thanks

janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Feb 2018 12:53 Edited at: 4th Feb 2018 12:53
1. You can set specular highlight with SP_Toon_SetSpecularPower(ObjectID,Power#) and the level of shades with SP_Toon_SetLevel(ObjectID,level) for each object.
Also this effect needs you to use the Lighting functions from the library like: LightID=SP_Light_AddPointLight(X#,Y#,Z#,Size#,Red,Green,Blue) and SP_Light_SetPosition(LightID,X#,Y#,Z#)
2. Use the Glow effect in combination with the illumination effect and provide a fourth image containing the glowing color.
You then can set the Glowing power with SP_Illumination_SetGlow(ObjectID,Glow#).
If you just want a single color glowing object you could even use AGK's CreateImageColor()

Hope that helps somewhat
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 4th Feb 2018 23:05 Edited at: 4th Feb 2018 23:45
I ran into a problem with the grid shader not working with Android - fwidth is not working on any of my android devices.

Are these shaders compatible? Can you add some GL ES check tests, if not? I think there are a lot of devices that do not support highp and other functions?

edit: my android devices also do not except derivative functions.

Works on my PC but not on Android:
+ Code Snippet
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Feb 2018 00:48 Edited at: 5th Feb 2018 00:49
That's right dfdx doesn't work in glsl es.
No shader in my shader pack use functions that aren't ES compatible, except of the wireframe shader, and I made a second wireframe shader that works on ES, which my lib automatically takes if it detects the mobile phone OS.
(no need to take action)
And the highp will be mediump in glsl es and should not be a problem.

The grid shader isn't part of the pack but I can try to find a solution for it too ofcourse.
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 5th Feb 2018 01:08
OK, just wanted to make sure before I planned anything else.

I do appreciate it. I have been looking, but I really don't understand the shader language enough to make more than minor changes. And def don't understand how to find derivatives.
Golelorn
1
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 5th Feb 2018 01:46 Edited at: 5th Feb 2018 02:33
Janbo,

I am sure this is specific for my needs but this ended up working:

+ Code Snippet

I vaguely understand why, but I much prefer paying a genius like you. It took me over 4 hours to adjust this tiny line of code... (btw, this is a dumb fish who is exhausted by swimming in math)

Maybe I am blessed since, as of right now, the Eagles are wining in Super Bowl LII.

edit:

I just want to add how appreciative I am of all this. It's increased my workflow by a ton. Thank you so much. I really think your shaders deserve more money. You have a skill that is quite simply fantastic, and beyond most people's grasp. I think the only way I would even have an iota of a chance to understand what you do is to learn engineering calculus... which I got a C in.. and made me change majors to Accounting... hahaha
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 5th Feb 2018 08:32 Edited at: 5th Feb 2018 08:33
Quote: "The grid shader isn't part of the pack but I can try to find a solution for it too ofcourse."

Is there any chance to include it? (I will gladly pay a bit more for this upgrade)
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Feb 2018 15:02 Edited at: 5th Feb 2018 15:11
@Golelorn: Thats cute, thanks
Please just divide by 0.01 then (you wont have the nice antialiasing in the distance then)
+ Code Snippet
@george++: The Grid shader hasn't a wide range of use like the other shaders in the pack, but if my customers want it, then it shall be.
So you will probably see it in the next version.
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 7th Feb 2018 23:57 Edited at: 7th Feb 2018 23:57
Im still a fan of NPR render.

@Janbo, i request pixelated 3d render that make edge of mesh pixelated in your next update or your new shader pack.

Thanks..haha

As in this.

https://youtu.be/5K5_D_sL8ec
Mobiius
Valued Member
14
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 13th Feb 2018 16:30 Edited at: 13th Feb 2018 16:46
I have a problem with the shaderpack!

I have a simple scene, consisting of the shaderpack water, SSAO and godrays. (And a tank object)

On windows it looks like this:


On android it looks like this:


I have a Samsung Galaxy S8, so it should be able to run properly.



Edit2:
It does run faster on my phone than it does on me laptop, but it only runs at 9fps on my Samsung Galaxy Note3!

Attachments

Login to view attachments
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 14th Feb 2018 08:02 Edited at: 14th Feb 2018 08:29
Are you sure your android device loaded the dudv map properly ?
You want to send me the source code so I can check whats happening ?
Mobiius
Valued Member
14
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Feb 2018 17:06
It was a filename case issue. Fixed it now.
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Feb 2018 17:43 Edited at: 15th Feb 2018 18:10
I knew that somehow, maybe I had the same error already at sometime
And glad its alright now.

I have so much stuff I want to implement... It gets messy in my head, you know what I mean.
Want to implement this latlong reflection mapping so you guys have some more choices:
-Dualparabolic (very vast)
-Screenspace (works best for floors)
-Latlong (alternative to cubemapping and slow)

But there is also this atlas texture problem that I'm facing to get many different textures working for the terrain shader with mipmapping.
I know you can just put a border around the subimages like GameGuru does, but before I take that solution I want to make more researches
Green7
12
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 19th Feb 2018 15:46 Edited at: 19th Feb 2018 16:06
I feel honored to show you some pics from the work-in-progress terrain shader made by janbo. content is made by me. it needs some polish, but the terrain shader works well.
for the content (heghtmap, splatmap,plantmap, trees) i used:
http://www.evolved-software.com/treeit/treeit
http://www.bundysoft.com/L3DT/

the shader is still beta and not aviable, but progress is going on, just wantet to show off, to be honest.



btw: i targeted the scene for pc...still have to optimize.

Attachments

Login to view attachments
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 19th Feb 2018 17:37 Edited at: 19th Feb 2018 17:38
Excellent work! I don't know though, using this shader, if i could be able to paint my flat terrain with rocky roads smoothly blended with the grass. In this case is it possible to define where the roads will be?
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 19th Feb 2018 19:59 Edited at: 19th Feb 2018 20:21
@george++: Yes thats the purpose of this shader, I use the splatmap technique where you have a color channel for each texture + the base texture so in total 5 textures for now.
But it also applies bump mapping which is encoded as height map into the alpha channel of the 5 textures.
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 19th Feb 2018 21:25
This is going a big step forward for AGK. It gives us the ability to make our games better. Thank you janbo
Mobiius
Valued Member
14
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 20th Feb 2018 09:01
Looks good. Can't wait to try it.
Green7
12
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 20th Feb 2018 13:22 Edited at: 20th Feb 2018 13:22
@george++: like this?

Attachments

Login to view attachments
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 20th Feb 2018 19:21
@Green7
You made my day

Login to post a reply

Server time is: 2018-02-21 01:26:35
Your offset time is: 2018-02-21 01:26:35