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
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 31st Aug 2018 15:12
Not sure what you mean.
What is your "layer mask" and how can it be based on a greyscale image
Quote: "But loading in via the shader still creates just a flat color"

What have you done before ?

Maybe try to get the base texture working first:
So you add your desired texture as the first texture parameter and fill the others with something else.
And a completely transparent splat-map as the last parameter.
The result should be the base texture only.
Then add a second texture id as parameter and alter the splat-map accordingly:
Just draw with red=255,Green=0,Blue=0,Alpha=0 to into the splat-map.
Now you should get two textures.

If that doesn't work something else is wrong here.
Golelorn
2
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 31st Aug 2018 15:44 Edited at: 31st Aug 2018 15:47
I am referring to the textures. I can only get the ones you provided in the example to work. I am attempting to learn how to make them in the same manner.


I don't have any problems with the splat map, and I understand how it works.

Sorry for the confusion.
Golelorn
2
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 31st Aug 2018 15:59
Oh, wow.... I am a complete idiot. I forgot to SetImageWrap on my textures... Sorry....
basicFanatic
1
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 1st Sep 2018 13:36
Hi janbo, would be super nice if this could work along with Rons VR extension. But no hurry. Right now I'm scavenging the 'Useful Community Shaders Project' thread for VR friendly shaders. Lots of broken stuff, but hidden treasures too.
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 6th Sep 2018 17:14
Hi @janbo. Are you planning release the water update?. Thanks

janbo wrote: "Just created the command set to setup the waves and foam.
You can alter the amplitude, length, direction, how many waves are layered over each other, the steepness and the speed of the waves.
The Waves are setup with a random parameters by Default."


http://www.nyan.cat/pirate
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Sep 2018 14:44 Edited at: 7th Sep 2018 14:46
Quote: "Are you planning release the water update?"

Of course, but I'm not sure how to time it, I wait for TGC to let me know when it's time, until then I consider/play with other effects.
For example I want to implement a full screen edge detection(like outlines but with a threshold to detect edges)
I know it has been a long time since the last update

Edge Detection: (Ignore the values)

Attachments

Login to view attachments
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 7th Sep 2018 16:45
Thanks mate and keep up the good work!
http://www.nyan.cat/pirate
Icerion
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 7th Sep 2018 17:18
@janbo : Are you able to release the Ocean / Sea foam shaders?

Thanks!
Arbrakan
8
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 17th Oct 2018 22:25
Hey thanks for the new update Janbo !!

Do you have a Patreon.com account ?
Golelorn
2
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 18th Oct 2018 04:04
Janbo,

Does the depth texture work on android?

Per AppGameKit help file:

"Note that some devices (particularly Android) do not support rendering depth to an image, in these cases the only valid values for the depth ID are 0 and -1."

Am I misinterpreting this?
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 18th Oct 2018 12:01
I'm back from hiking.

@Arbrakan: Hey, no I have not, and never thought about that as I already charge money for the pack itself,
so don't give me something for that, but what you CAN do, is talking about the shaders, and especially finish your awesome game

@Golelorn: Yes my shader work on android too, till now I'm the only one who made depth maps for mobile possible via a separate shader which encodes the depth in the RGBA channels
Golelorn
2
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 18th Oct 2018 22:34
Gotcha, thanks Janbo.
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 21st Oct 2018 22:02
Any news about the water upgrade?
surfing dry land
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Oct 2018 19:00 Edited at: 22nd Oct 2018 19:03
I see...
there is no separate Ocean Demo for the Ocean shader... It is demonstrated in the Collection Demo though.
nonom
1
Years of Service
User Offline
Joined: 12th Nov 2017
Playing: AGK2
Posted: 6th Nov 2018 17:39 Edited at: 6th Nov 2018 17:40
janbo wrote: "there is no separate Ocean Demo for the Ocean shader... It is demonstrated in the Collection Demo though."


It's just what I was looking for. Thanks janbo!!
surfing dry land
CJB
Valued Member
15
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 7th Nov 2018 16:16 Edited at: 7th Nov 2018 16:21
Should the Shader Pack appear in the IDE DLC menu? I have the shader pack in my steam library, but it's not appearing in the IDE (I'm sure it was there before).

EDIT: Fixed it! I un-ticked the shader pack in steam, then re-ticked it and it's back.

Attachments

Login to view attachments
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 31st Dec 2018 19:44 Edited at: 31st Dec 2018 19:49
Hi,
I have a difficulty using the shader pack.
I have the following folder structure for my projects:
Quote: "
c:\AGK Projects\project1
c:\AGK Projects\project2
"


and so on..

I've copied the Templates folder from the shader pack to the following location:
Quote: "
c:\AGK Projects\Templates
"


I included statement into my main.agc as follows:

The application runs by pressing the F8 key but not if I press the F5 key. I get the following error:


The same error applies when I try to run the app in my tablets using the F6 key
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Jan 2019 13:00
AtlasCombine.pc is a shader file and should be located in your projects main/shader folder.
Could be, depending from where you copied from not all shaders are in there. But in Tamplates/shader there should be all shader included.
Never had such strange issues using F8/F5
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 1st Jan 2019 13:59 Edited at: 1st Jan 2019 14:02
Hi janbo,
I copied the shader forlder to my project media file. My project has non name yet so I decided to name it "noname". The folder structure now is:
Quote: "C:\AGKProjects\noname\media"

and
Quote: "C:\AGKProjects\noname\shaders"

Although I have no any issue any more by pressing both F8/F5 keys, I still cannot broadcast [F6] my project to tablet:
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Jan 2019 14:35 Edited at: 1st Jan 2019 14:42
Are you sure you mean
Quote: "C:\AGKProjects\noname\shaders"
because it should be located in C:\AGKProjects\noname\media\Shader then
Also make sure to write the folders first letter in upper case as Android is case sensitive.
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 1st Jan 2019 15:24 Edited at: 1st Jan 2019 15:28
My mistake, I mean:
Quote: "C:\AGKProjects\noname\media\shader"

but I cannot broadcast

EDIT: Thank you janbo, the first letter wasn't in upper case. It works now!
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 1st Jan 2019 15:42 Edited at: 1st Jan 2019 15:43
After I managed to run the game on my tablets, I noticed a frame rate drop from 60 FPS on my PC, to 40 FPS on my Asus & Samsung with the use of the water shader
Rick Nasher
1
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 2nd Jan 2019 15:10
I my experience shaders are a bit more intense on older hw. On my Galaxy phone no problem. On my old HP laptop from 2007 (and not really build for top notch shaders) it's nearly unusable so there I use janbo's very first "Water for all" shader, which makes a big difference on fps.

Might be an idea to include in the package? But then again, if people want to use it they can download it from the site I guess.
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 2nd Jan 2019 20:41 Edited at: 2nd Jan 2019 20:43
I don't know how fast my tablets are. It is a Samsung Galaxy Tab S2 and an Asus ZenPad 8. I have to admit that I have never played games with high graphics requirements.
This frame rate drop, makes my game not playable, and I'm disappointed, since I do not know how fast it will run on other tablets. I do not claim that janbo is responsible for this but I am wondering if I can make games with AppGameKit that run fast enough as other languages
Is there is something that I have to take care, or this is the limit?
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 2nd Jan 2019 21:37 Edited at: 2nd Jan 2019 21:49
My old water shader shouldn't make a big difference in performance.
You could try to comment out the lines where I mix a bigger version of the textures into the final color values depending on the distance so you can't make out any pattern so easy.
I was asked to add that but it also adds two extra texture samples to it, one for the distortion and one for the normals... should be around line 81 and 92 maybe that helps

Everything else should be faster than before and nicer
With the Water shader one should be able to make a deep sea, a shallow pond and also a swamp and so on, all in one shader, thats why it's kinda heavy
Do you have many objects in your scene ?

Ah and I had no lights for the water shader before, so that might hit the performance too
Around line 105
Just say if I should make performance tests or if it's fine for you to try these things ...I don't want to let you in the dark
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 3rd Jan 2019 15:04
Thank you janbo for helping me.
Unfortunately I cannot modify the shader code since I have no knowledge on this topic.
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Jan 2019 15:40
I got another Idea why it could be a little bit slower for the mobile version especially.
For many parts of the water shader I need the depth, for example the smooth edges or the water depth color,
but in AppGameKit there is no depth support for mobile devices so I made my own which of course adds a tiny extra cost of performance to encrypt and decrypt the depth image with AGK's toolset.
george++
11
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 3rd Jan 2019 18:21
Quote: "Do you have many objects in your scene ?"

Does this have impact to the shader?
I don't know yet.
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Jan 2019 18:41 Edited at: 3rd Jan 2019 18:41
I check if there are objects above and under the sea level and clip them accordingly to the reflections so there is at least that one little check and pixel discard if an object intersects with the water
But again that shouldn't be a big performance hit.
fubarpk
AGK Developer
Gold Codemaster
14
Years of Service
Recently Online
Joined: 11th Jan 2005
Location: Adelaide
Posted: 8th Jan 2019 19:53
The shader pack is great I must say
The only issue i have is i might want to just use one of the shaders not the whole pack at any one time altho it is quite possible to do this with many of them
some of them seemed to be a big part of the pack and, i like the idea of using one of the shaders and not use the complete code that comes with them.
I find them more usefull this way as i tend to write for mobile and i know shaders arent good for mobile usage there is often times when one or two of them
could be handy and not the whole pack.

With that said i love the way you supply the shader code with them, which does allow the above just hard to get some of them to work without the pack.
I am glad it has the code seperate to the shaders, and was skeptical tho wether i should make the purchase thinking they might all be part of a encrypted pack.
So glad they are not, but i did put off my purchase for sometime thinking i mightnt be able to use just one or two shaders without the whole pack, which wouldve
made a decoration on my harddrive and not get any use
fubar
janbo
10
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 8th Jan 2019 20:30 Edited at: 8th Jan 2019 20:32
Yeah I thought of all of that and it's right, you can't just lets say use the SSAO part of the library as it depends on SP_Init, SP_ShaderManipulation,SP_PostProcessing and then SP_Init depends on some other includes again.
In AppGameKit we don't have pragma once, namespaces, pointers or other fancy stuff, so if the files depend on each other then ...they depend on each other
I don't think it's possible to make it like an immediate-mode-effects-library where you set some parameters, draw it and everything is fine.
They work together, you can see that pretty easy with fullscreen shaders if you change the order of those few lines in SP_init you might get a whole different result.
If you know of a better layout then feel free to suggest it here.

But you can get away with those three includes if you strip down the other effect functions from the SP_Init and SP_Lighting file, then the many little functions come to fruition too.
About the raw shader files.. it's probably not communicated to good.

Login to post a reply

Server time is: 2019-02-23 00:19:00
Your offset time is: 2019-02-23 00:19:00