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

Author
Message
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Jun 2018 15:03 Edited at: 24th Jun 2018 15:07
Hi Carharttguy
The Shader pack will be installed in Steam\SteamApps\common\App Game Kit 2\DLC\Shader Pack but you can also find it within the IDE -> DLC -> Shader Pack
Have fun
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 24th Jun 2018 19:35
Thanks for your fast reply Janbo! I didn't restart the IDE yet so the DLC menu wasn't there yet.

The shaders look really nice (the one that works) But I get some errors at some (water, terrain).
See error message:



Is there a way to fix this?

Thank!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Jun 2018 20:04 Edited at: 24th Jun 2018 20:18
Does this happen on mobile, this is more likely to happen for mobile devices...
You can try to take the raw shader code (Shader Pack\Templates\ShaderPack\Shader Raw\Water.ps) and put a precision before every variable or just delete the #ifdef GL_FRAGMENT_PRECISION_HIGH... might help.
If you want to use the Raw shaders, just paste SP_SetReadRawFiles(1) after SP_Init() and copy the raw shader files into the shader folder of your project.
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 24th Jun 2018 21:29 Edited at: 24th Jun 2018 21:31
nvm this.
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 25th Jun 2018 08:35
Hi Janbo

I tested what you said, and indeed, loading the raw shaders and deleting the #ifdef in the water shader fixes my problem!
I'm afraid this is not on mobile, but on a windows 10 machine. Altough this is a Macbook Pro with Win10 installed (no Bootcamp), Maybe that's why I have issues?

Another small question: Do the shaders only work with SP_Light, or also with the AppGameKit build in Sun? If not, do the AppGameKit build in Shadows work with SP_Light?

Thanks a bunch for your help!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Jun 2018 16:21 Edited at: 25th Jun 2018 17:10
Most of them are safe to use AGK's Lighting commands in fact I use them too.
SP_Light utilizes AGK's Lighting and for every shader that can't use AGK's light I reconstructed the behavior so you won't get different results between the effects.
But for the Specular, Illumination and Toon shader I had to make customizations, so they need the setup provided by my SP_Light commands.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 2nd Jul 2018 18:09 Edited at: 2nd Jul 2018 18:09
Sorry, responded to old query.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 17th Jul 2018 03:48
Would like to request a grass shader that sways
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Jul 2018 10:51
Hah, alright im kinda busy right now but a swaying tree an grass shader is on my list
Alien Menace
AGK Developer
19
Years of Service
User Offline
Joined: 11th Jan 2005
Location: Earth (just visiting)
Posted: 27th Jul 2018 01:02 Edited at: 27th Jul 2018 01:02
Wow, those waves and foam look great. Would like to recommend adding caustics...

https://youtu.be/R2yJeq_3IGk
I love my Altair 8800 Replica.

http://altairclone.com/
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 3rd Aug 2018 18:43 Edited at: 4th Aug 2018 01:38
Hi, I'm new here & would also like to see caustics & buoyancy added to the shader pack! Also, can you please release the seam foam / waves shader? I'd be willing to purchase your pack if you did that.

Thank you so kindly!
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 02:50
Hi @janbo, I just purchased your shader pack & when I went to compile some demos, all of them received an error message similar to the following attachment

If you could help me fix this ASAP, I would very much appreciate it!

Thanks again janbo!

Attachments

Login to view attachments
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 15th Aug 2018 13:14
Janbo, I meant to say btw.....when I run the demo with all the shaders it's unusable. The water is all over the place, often filling the screen. Has anyone else reported this?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Aug 2018 15:11
@Icerion: can you try using the unencrypted shaders and see if you get the same message ?

@Santman: you are the first, can you post an image ?
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 15:23
@janbo : What unencrypted shaders? How do I do that?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Aug 2018 16:08 Edited at: 15th Aug 2018 16:14
In AppGameKit Shader Pack\Templates\ShaderPack\Shader Raw you find the unencrypted shader files which you can alter and encrypt again with the tool I made for it, you can find it in AppGameKit Shader Pack\Encryption.
My System searches for encrypted shader files with the .vc and .pc endings by default. You can change that in your project code with SP_SetReadRawFiles(1)
Now try to copy and paste all unencrypted shaders in the projects shader file you are using, althrough you still have the encrypted files in the AppGameKit Shader Pack\Templates\ShaderPack\Shader folder, its best you make a back up of the old files.
Also you might look here
Remember you can always encrypt your custom shader files with my tool
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 17:56
@janbo : Is there a way to just use the unencrypted shaders?

Thanks!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Aug 2018 18:20 Edited at: 15th Aug 2018 18:21
Sure:
Quote: "You can change that in your project code with SP_SetReadRawFiles(1)"
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 18:31 Edited at: 15th Aug 2018 18:34
@janbo : Thank you. So I did that & now I am receiving the following error in the attachment below.

It is the Terrain demo I am trying to access.

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Aug 2018 19:03 Edited at: 15th Aug 2018 19:04
Well that just says there is no BlurH.ps file, so try copying it from the template folder, make sure its a raw shader file (.ps and .vs).
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 19:32
@janbo : Which folder should I put these in?
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 15th Aug 2018 21:26 Edited at: 15th Aug 2018 21:32
Icerion,

I had this problem, as well. Can you set AppGameKit to always use your GPU card? I use a laptop, and I think to conserve power everything is defaulted to the integrated video card, which is total trash.
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 15th Aug 2018 21:41 Edited at: 16th Aug 2018 14:59
@Golelorn : Thanks for the information!
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 16th Aug 2018 14:59 Edited at: 16th Aug 2018 16:51
@janbo, @Golelorn : How would I do that?
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 16th Aug 2018 21:42
Anyone here?

Thanks!
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 16th Aug 2018 22:02
I don't think that you can do anything using the pack or tbe AGK.You have to check the options available through the graphics card panel
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 16th Aug 2018 22:56
This is so confusing. I just want what I purchased to work right.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 17th Aug 2018 14:52 Edited at: 17th Aug 2018 15:14
Thank You @Golelorn, tried that, and to no avail. Why should I have to do this just to get a product that I paid for to work?

This is ridiculous.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 17th Aug 2018 15:39 Edited at: 17th Aug 2018 15:40
If you're using nvidia open the Nvidia control panel by right clicking the desktop area.


Go to programs tab. Select Add. You will need to add any project you're working on. Its not AGK's fault that your GPU is defaulting to the on-board graphics card.


Attachments

Login to view attachments
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 17th Aug 2018 16:05
My apologies, I misunderstood. But even if it's on-board, it should work right out of the box. I paid for it, and it should work.

Thanks!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 17th Aug 2018 20:49 Edited at: 17th Aug 2018 21:50
I guess thats a laptop problem where AppGameKit thinks it can do proper GLSL but because the laptop don't uses the “real“ GPU it can't handle it.
In detail: GLSL ES needs precisions like lowp,mediump or highp but the normal GLSL in return dont like precisions so AppGameKit tries to detect the GLSL version and confuses the capability of the laptop and leaves the precisions in the shader code.
Sorry for the late reply and the spelling mistakes i'm at my phone and i need to hurry cause it is on 3% battery live
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 17th Aug 2018 21:02
@janbo : So what do I need to do to get it to work? I purchased it, and expected it to work.

Thanks!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 17th Aug 2018 21:46 Edited at: 17th Aug 2018 21:48
Either you change the settings of your laptop to use the "real" GPU like Golelorn describes(thanks by the way) or you remove the precision modifiers from the shader files, which I don't recommend, but is a good test to identify the problem.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 17th Aug 2018 21:56
Mine works...
-Do you open the example from "\Steam\steamapps\common\App Game Kit 2\DLC\Shader Pack\Terrain"?
-What graphics card does your rig have? does it even have a dedicated one?
-Programming is all about solving problems and having lots of patience, try and error, again and again. there is no way around it. have some patience with peoples trying to help you.
Icerion
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 17th Aug 2018 22:09
I have an NVidia GeForce GTX 960M. I actually purchased the real thing, not the steam version. I am being very patient, actually. Most people would have gotten a tad bit upset.

Thanks!
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 18th Aug 2018 00:13
Icerion that is the same chipset I use on my laptop. To conserve power our laptops are always set to use the integrated gfx card, unless we add programs via the Nvidia Control Panel. I also have to add games that I buy via the same panel or the game runs like trash.
Santman
12
Years of Service
User Offline
Joined: 15th Sep 2011
Location: Inverness
Posted: 19th Aug 2018 11:47
Icerion, your not being patient at all, yoir being very rude and coming over incredibly entitled. To be frank, it doesn't sound like a shader issue, it sounds like your hardware, if your trying to run sophisticated code on very old or low end hardware that's not the shaders fault, and Janbo is going out of his way to help when he's no obligation too, as are others.

Tell you one thing though, if those don't work on your hardware then all the code and shaders you keep asking me to upload for free won't work either.
encode_decode
5
Years of Service
User Offline
Joined: 3rd Aug 2018
Location:
Posted: 20th Aug 2018 04:22
It is not a hardware issue at all - that hardware is only 4 years old.
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 20th Aug 2018 09:00
Hi Santman,
My hardware is not old and your shaders as well as the shaders of janbo, are working like a charm, so you and janbo keep up the good work!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Aug 2018 01:49
Is there a shader that will render a model using the colours that the model was saved with (Not a texture but the given colour)?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Aug 2018 15:06 Edited at: 24th Aug 2018 15:12
Yes the default Object shader from AGK.
You don't get around parsing the color data and setting the color vertex attributes accordingly, this is a mesh manipulation task... rather than a shader task.
Not sure if AppGameKit already parses the colors with assimp, but there is the SetMeshMemblockVertexColor command already so you could take that and create your own parser.
In my shader pack in SP_MeshManipulation.agc I have some code to add the color attribute and I think you could insert the parser there too.
(parser is a bit overpowered for only reading some lines with the color keyword/position from a file)
Is there a specific effect you want to achieve ?
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Aug 2018 22:37
I think it was you who wanted to use the free kenney models but because it didn't render the colours they became pretty useless
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Aug 2018 23:23 Edited at: 24th Aug 2018 23:24
You are right but what I said above still counts.
I remember I had it working somehow and started working on other things for my project, I'll post something tomorrow.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Aug 2018 23:59 Edited at: 25th Aug 2018 23:59
In my project I used a cheap trick... I Read the color fom the .x file and created a one pixel color image then I add it to the object mesh

This should work with SetMeshMemblockVertexColor too if you can find the vertices.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 30th Aug 2018 23:12 Edited at: 31st Aug 2018 00:01
Hey Janbo,

Couple questions on the terrain shader.

First, I love it using the textures you provided. I love the alpha normal mapping. Really makes this shine. I am getting the same FPS with this, as I had with my old shader that had no normal mapping.

Unfortunately, I have run into a few problems, and would really appreciate your time.

I am getting a lot of mixing of the colors. Texture0 is almost always there even when all my colors add to 255. For instance, R-0, G-180, B-75 gives me all 3 textures, instead of 2. When I have the color maxed at 255 there is no blending.

I never went to 255 green on this splatmap - the highest was 179. But I also didn't think I did 255 blue, but blue seems to show a lot more than green.

How are we suppose to make the textures this shader needs? I have tried to use my own textures, and even ones that have alpha in them( if you have Gameguru I tried to use those default terrain images which are alpha blended ). The result is just a brown color. I assume the "alpha trick" is what is causing the problem. Even just a link or the name of what this process is called I can google it on my own.

I also attached the splatmap, if you were curious.

With texture0 and colors_total = 255 - the clear "path" is very high blue.


No texture0


GameGuru textures


Your provided textures with texture0 and all stages, but 4 AKA alpha

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 31st Aug 2018 00:32 Edited at: 31st Aug 2018 00:38
Hi,

Good and bad news I guess
-If you set all 4 color channels in your mask texture to 0 you should get the 100% visibility of the Base texture.
-Using the 4 color channels in the mask texture you are able to mix 5 textures as you have 1 base and 4 others textures.
-The order of the textures are important. The first one you pass to SP_Terrain_AddObject() is the Base texture the second is Red in the Mask texture Green is the third and so on (Blue and Alpha).

To create the individual textures:
-You would need to copy the Red channel from the belonging height map into the alpha channel of the texture you want to use.
-So actually, as it uses height maps its not normal mapping anymore, its height mapping or bump mapping in general
-The textures are made by Green7, not sure what tool he used but it should be possible with every decent texture editor.

[Edit]Now saw your mask texture: You have Alpha set to 255, so you will get the last texture(Stone) everywhere[/Edit]
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 31st Aug 2018 09:08 Edited at: 31st Aug 2018 09:11
I do the splatmap like this: If you have finished your painting, for example in photoshop, just set the overall transparency of each layer to 1%. It looks like a empty map, but this is how i got it working.

EDIT: For the textures, i need to look at it again, its quite a time since...
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 31st Aug 2018 13:29
OK, thank you for the explanations.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 31st Aug 2018 14:55 Edited at: 31st Aug 2018 14:55
I added a layer mask based off the grayscale image of the texture. And it added alpha info to the texture. But loading in via the shader still creates just a flat color.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-26 13:34:37
Your offset time is: 2024-04-26 13:34:37