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 Dec 2017 14:21 Edited at: 24th Dec 2017 14:32
Quote: "Hope to have neon glow effect in the future"

I try to listen to the comunity so its already done for the next version in January
I added a full-screen effect that catches a pre-rendered "glow map" and blurs it so it looks like glowing after merging everything... thats pretty much how every game creates glow effects.
If you guys bought the pack and have an slack account, I can invite you to the beta test group if you don't want to wait and help me out sometimes.
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 27th Dec 2017 17:44
Hi

Ihave a question : are those shaders working with animated objects ? (Dae for example)
AGK2 tier1 - http://www.dracaena-studio.com
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 28th Dec 2017 06:23 Edited at: 28th Dec 2017 06:32
Quote: "are those shaders working with animated objects ?"

Yes, I made a vertex shader supporting animated objects for every effect.
My lib automatically detects if the object is animated and selects the right shader set for it.
The lib also detects other stuff like... if your device supports depth textures or not ... if not then it renders the depth of the scene with a custom shader etc...
I think sometime I create a system to generate shader code and insert parts into the shader string.... so you can kind of combine effects...
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 28th Dec 2017 08:02
@janbo: great job, congrats
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 28th Dec 2017 20:15
Janbo : what do you think about a shader editor ?
It could be great to have the possibility to create our shader with preset and special blendmode.
In glsl, we can mix the result in normal, multiply, additive, etc... mode.
So, to have the possibility to choose the images by channel, and other things could be great to create our own shaders .
AGK2 tier1 - http://www.dracaena-studio.com
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 29th Dec 2017 22:52 Edited at: 29th Dec 2017 22:53
@george++: Thanks
@Blendman: I already thought about making a shader editor ...a node based like the others but with AppGameKit uniforms ans stuff.
But thats on the bottom of my list.
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 30th Dec 2017 01:25 Edited at: 30th Dec 2017 01:26
Thanks Jambo for this epic shader pack ! I love it !

I'am working on a MAXScript for a Exporter 3DS to AppGameKit for my project. And I juste get the shader pack working now

A little vidéo of my "Map Editor" wip :
https://screencast-o-matic.com/watch/cblvVoocfc
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 31st Dec 2017 10:44
Hi,

There is a way to get the fog working ?

I can't get it. Some help will be greatly appreciated!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Jan 2018 02:27 Edited at: 2nd Jan 2018 16:38
@Arbrakan: I'm really sorry in the current published version I have forgotten to implement the fog function in some (actually in most) effects.
But you will get the new version in a few days which will include all new effects, some optimizations, bug fixes and of course the ability to apply AGK's fog.
If you want it now then you have to implement what is described here SetFogMode or here Shaders in AGK into the pixel shaders.
Or you grab the new version from the Slack beta test group.
Rick Nasher
6
Years of Service
User Offline
Joined: 25th Jul 2017
Location: Amsterdam
Posted: 2nd Jan 2018 09:30
- Purchased it -
Thanks for answering my question, sorry for slow reply.
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 2nd Jan 2018 14:43
@janbo Thanks ! Can't wait to paly with the new version
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 2nd Jan 2018 23:39
There will be bloom effect in the upcoming version ?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Jan 2018 00:42 Edited at: 3rd Jan 2018 00:42
Quote: "There will be bloom effect in the upcoming version ?"

Yes, it's a glowing effect that catches the lighting parts of the illumination effect and makes it more visible by blurring it, if that makes sense to you.
You can make parts of an object glow by manipulating the illumination map.
The illumination effect is a shader that is applied to the object and the glowing effect is a fullscreen shader, they best work in combination.
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 3rd Jan 2018 12:54
Awsome janbo, thanks !
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 3rd Jan 2018 19:09
Just wanted to say: thank you for this product janbo! Amazing quality and ease of use!
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 4th Jan 2018 16:08 Edited at: 4th Jan 2018 16:08
I've just bought the shader pack yesterday (and I'm so far loving it!) and wondered if it would be possible to do the following..

I'd like to combine the fur shader, with a bump/normal mapping shader, based on an environment map, which also decides on the objects texture.

For example, One texture layer (the left part of the image) decides what texture the terrain uses, creating a multitextured object. (The right part of the image)
The same texture will also decide what shader to use. So the grass texture will render with the fur shader, rocks with a normal map shader.
This way we can create either terrains with different appearances. (Grass, rocks, sand ect) It could also be used to apply different effects to other objects, like cars. Shiny body, glass windows, all based on a single environment map.)

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Jan 2018 18:04 Edited at: 4th Jan 2018 21:10
@Arbrakan and Zerotown: thanks, you can vote me for the AppGameKit Tool Maker badge if you want (Is this a tool ? )

@Mobiius: I could make a terrain shader that blends four textures depending on the RGBA channel of a mask, but i'm not sure if I want to start combining shaders.
If I combine fur shader with terrain and normal mapping, It wont last long till I should make other combinations too.
I want to give you as many different techniques as possible not as many combinations as possible, I rather explain in detail how to achieve what you want with the help of already made shader effects.
I already had many hours thinking of a node based shader editor and how I need to change the library to combine the the shader snippets, but that might be far in the future.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Jan 2018 08:59
I'll perhaps have a look at it myself then.

I've nominated you for the AppGameKit Tool maker badge. I forgot we could do that!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 5th Jan 2018 14:19 Edited at: 7th Jan 2018 03:50
Yeay, thanks ...I now have the same amount of badges as you

I think, I need to create a terrain shader at some time anyway, so maybe I do it now, send it to you and the beta group and also add it to the pack's next version release.
If you want to make your own custom shader compatible with the water shader you need to load the shader with SP_LoadCustomShader(VertexFile$,PixelFile$).
This command reads the encrypted file and inserts the code for the clipping plane needed for the refraction and reflection render of the water.
You can also make it compatible with the water shader by only using SP_Clipping_AddToShader(VertexString$,PixelString$) if you don't want your custom shader to be encrypted because of some, unknown to me, reason
You can modify my shaders as you like as long as you encrypt them in the final release of your project.

[Edit]
Quick Fix:
I just realized I messed up the specular shader by thoughtlessly copying some code from my Galss shader into the Specular shader.
So I fixed a problem where the specular shader only samples the front environment map.
This fix will be in the next version, If you want the fix right now then just copy this Specular.pc file into your projects shader folder.
Optionally: if you want to use roughness in the Green channel of your specular map you need to change line 45-46 in SP_Environment.agc to use mipmapping:

Now maybe I should call it PBR like the others do
[Edit]

Attachments

Login to view attachments
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 6th Jan 2018 01:47 Edited at: 6th Jan 2018 01:48
Thanks Janbo, It is so much fun these shaders ! love it !

WIP :
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 6th Jan 2018 03:48 Edited at: 7th Jan 2018 11:50
Oh darn that looks so beautiful, its obvious one could craft nicer scenes with my shaders than I did, but that
What shaders are you using in the scene ?

Did you follow a concept art ? can we see it ? what are the plans for this scene ? will it be a game ?
I love the moody look of it, if you can keep up the polish over the whole project then it will be awesome.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 6th Jan 2018 12:13
@Arbrakan
Now this looks crispy! swiss quality

@Janbo: Now the last step seems to be having multible dynamic shadows, the rest is up to the artists.
RickV
TGC Development Director
23
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 6th Jan 2018 16:18
Loving that WIP screen shot Arbrakan!

What the plan for your game?
Development Director
TGC Team
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 9th Jan 2018 06:41 Edited at: 9th Jan 2018 17:10
@Mobiius: Do you have a favorite program for combining alpha maps to splat maps for the terrain ?

I have a shader that gets one splat map and 5 diffuse textures working... nothing fancy.
Would you guys like me to add something to the terrain shader ?
I'm going for the method Unity describes here TerrainAdvancedTextures under the Super Masks: Increasing terrain detail beyond the vertex level section.
I could also add that normal super mask !?
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 9th Jan 2018 08:55
The Super Mask thing looks like a real addition, and even with normals, it adds some big amount of quality.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 9th Jan 2018 09:16
Quote: "Do you have a favorite program for combining alpha maps to splat maps for the terrain ?"

No. I haven't really used any advanced terrainy stuff in AppGameKit, and the stuff I did in DBPro was all procedurally generated by the shader. (Thanks to GreenGandalf.)
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 9th Jan 2018 16:46 Edited at: 9th Jan 2018 16:47
Thanks all !

@janbo Thanks I use this shaders :

Lighting
DoF
Specular
SSAO
ColorGradings (Love this one ! ) here is my own lut i'have made for this project :

Environment
Glow


@Green7 Thanks !


@RickV I Just made a tread for this project : https://forum.thegamecreators.com/thread/221334
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Jan 2018 17:16 Edited at: 10th Jan 2018 17:29
Updated the first two posts.
I have now a FAQ section
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 11th Jan 2018 13:23 Edited at: 11th Jan 2018 13:27
i noticed a graphical glitch in SSAO: if the camera points at a parallel object, the edges of the polygons become visible. is there something i miss to adjust this?
The blurry background is a environment map on a invertet sphere.

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 12th Jan 2018 13:20 Edited at: 12th Jan 2018 13:22
As it is the skybox SetObjectDepthWrite(SkyObjectID,0) should do the trick.
SSAO uses the depth buffer to know where nearby fragments are to create the effect.

Its a Good question.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 12th Jan 2018 14:14
Thanks, i will have a look.
Btw: the reflections effect seems not to work very well for flat or big objects, say for a floor plane. is it meant for small objects, or for big levels? or is there something i miss there?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 12th Jan 2018 15:30 Edited at: 12th Jan 2018 15:57
@Green7: If you use the Specular effect then you need this little fix.
But you are right for "big" objects it doesn't work very well. It's the downside of being so fast.
I create the effect on the vertex level only, so it doesn't look nice for large objects with only a few vertices, as the fragments get interpolated between the vertices.
You can counter this problem if you divide the large object into parts... also mentioned here.

The more Vertices the better it looks:

Attachments

Login to view attachments
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 13th Jan 2018 11:24
Ha! i knew it! There was something ringing in mi head, just couldn't remember what it was. more vertices is not a problem, agk handles big amounts of vertices very fast thanks a lot for explaining!
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 13th Jan 2018 15:45 Edited at: 18th Jan 2018 14:00
Right normally you don't even need much more for example in my collection demo the floor has this problem but i think if I only divide it once it will be fine.
And if you don't divide the objects, you probably wont even notice anything if you have a rough object. (the human is very easy to fool regarding reflections).
You can provide the roughness with the specular map in the Green channel (specular in Red and roughness in Green).

I have also a little preview of the new terrain shader for you guys.
Terrain Splatting+Bumpmapping


Note that I use height mapping, which is different than normal mapping:
Heightmapping is the older version of normalmapping but has the upside that it only needs one color channel to work.
Normalmapping saves the normal direction of the surface into the RGB channels of a texture.
The terrain shader needs the height/bump map in the alpha channel of the 5 different textures.

Attachments

Login to view attachments
george++
AGK Tool Maker
16
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 13th Jan 2018 16:06
Nice one, this one with the terrain splatting.I hope that you will provide an examble for this.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 15th Jan 2018 12:54 Edited at: 15th Jan 2018 13:21
Terrain comes along nicely!

Quote: "But you are right for "big" objects it doesn't work very well. It's the downside of being so fast.
I create the effect on the vertex level only, so it doesn't look nice for large objects with only a few vertices, as the fragments get interpolated between the vertices."

may it be possible to get this effect on a "per fragment" level, so it gets a more mirror like look? btw: i have noticed a strange thing: if you set up SetShadowMappingMode(3) i get a strange white reflection, and it reflects the moving shadow at some points, in a different angle. hard to explain the shadow thing, but the white reflection is clearly visible, and only in shadow mode 3 , not 2 and 1.

EDIT: there may be a possible answer:
Quote: "Note that when using modes 1 and 2, texture stage 7 on all objects receiving shadow is reserved for the shadow map. When using shadow mode 3 (cascade shadows) then texture stages 4, 5, 6, and 7 are reserved for the shadow maps. "
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 16th Jan 2018 09:51 Edited at: 16th Jan 2018 10:01
If you set the roughness to zero(no green in the specular texture) then it should reflect like a mirror.

Yes I use the texture stage 4 for the back of the environment map right now.
The textures used by the specular effect:

The only thing I could try is to write the front and back of the environment textures into one, so I end up using stages 0-3, to save the space for the cascade texture of shadow mode 3.
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 17th Jan 2018 20:48
I've got to say, this shader pack has me seriously considering for the first time porting my dbpro project over to agk. It stacks up well against Evolved's AdvancedLighting, and it is something agk needed for sure.

Terrain looks great, keep going!
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Carharttguy
7
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 17th Jan 2018 21:17
WOW Janbo. That terrain shader! It looks gorgeous. To be honest I postponed buying the shader pack to the release of that shader.

Any ETA?!
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 18th Jan 2018 07:52
This would be complete with a bunch of interesting 2d shaders and maybe some fullscreen shaders.
Arbrakan
13
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 18th Jan 2018 09:29
And real time shadows from a light point
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 18th Jan 2018 11:03
I second Arbrakan with that, point light shadows, from multiple sources, if possible.
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 18th Jan 2018 11:46 Edited at: 20th Jan 2018 02:21
@Ortu:
Thanks, I'm looking up to the advanced lighting lib, kind of.

@Carharttguy: Thanks and I planned it to come along with a converted Tier 2 library.
But I haven't started converting yet and I also try to solve that shadow mode 3 problem right now mentioned above. (Just fixed the problem by rendering an atlas texture from the back and front of the environment map at runtime)
So maybe in a month or two.

@IronManhood: I'm sorry, this is a 3D only shader pack. I might do a 2D one in the far future.
The Godray, ColorGrading and Glow effect are fullscreen shaders and abusing them for 2D should also be possible.

@Arbrakan&Green7:
Possible if not combined with other effects but normalmapping and directional light shadows.
I see a problem in the limited texture stages again, there is texture stage 1 and 3 left then...
I could use texture atlases there too, but I did't find a way to get rid of the seams resulting from interpolating between pixels. (Shadow maps don't need linear interpolation)
This again, is a feature for the far future.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 24th Jan 2018 23:48
janbo,

When i add specular to an object with a lightmap previously added on texture stage 1 and normal map on stage 2, it seems to remove the blended lightmap and the normal map effect ...

it's a normal behaviour or i'm doing something wrong ?

is the specular shader is supporting diffuse (0) + lightmap (1) + normal (2) + specular (3) ? or is only doing specular based on the diffuse and normal maps ?

Edit : arg .. the environment map seems to take the stage 1 ... ouch ! so it seems incompatible with lightmaps ... (but why the normal map effect no longer works ?)

Thanks in advance

janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Jan 2018 00:40 Edited at: 25th Jan 2018 00:56
There are the environment maps in stage 1 and 4 and I already made changes for the new version so the environment maps only use stage 1 to make space for the shadow mode 3, which takes stage 4-7.
I'm sorry I can't make more space without disadvantages.
You have two options if you want it to work anyways:
1. You simply don't use shadow mode 3 and therefore you can put the environment map into stage 4 in the next version.
2. Instead of using normal-mapping directly, you encode the height of the bump-map into the alpha channel of the diffuse or specular map.
( I can send you the shader)(Normal-map & height-map = bump maps... you can convert normal maps to height maps and back)
3. I somehow come up with a technique to sample atlas textures that also works with LOD

Paul could help me out here.
He could make shadow mode 3 to only use 3 or 2 textures with the texture for the far cascade being larger in size to keep the good quality.
Using less texture samples could also be faster stated by Lee somewhere in the new GitHub project for Gameguru.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 25th Jan 2018 07:09
4. or i simply don't use specular on lightmapped objects :p

Thanks janbo i will think about all your options
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 25th Jan 2018 07:44
Are your light shaders faster then the native agk ones?
Iam starting to progress my game Engine and looking for things to improve..
Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz

Attachments

Login to view attachments
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Jan 2018 13:05 Edited at: 25th Jan 2018 13:24
Quote: "Are your light shaders faster then the native agk ones?"

No, for compatibility reasons I have chosen to take AGK's GetPSLighting() function.
The only shader with custom lighting is the Toon shader

This is AGK's light calculation:

Of course the GetPSLighting function is generated dynamically with code for shadows and ambient light too.
Can't see where to improve it, also because Paul generates the amount of lights being active for the objects if in range.
Maybe you can change the attenuation calculation to something without using the dot product but then you also loose AGK's ability to change the amount of lights depending on range.
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 25th Jan 2018 14:49
A long while back so did i do alot of custom ones that where slightly faster but cant find them now
I used to write alot of agk shaders but dont remember wich usb flash or computer i have them on
Maybe i will make a hack at it again......
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 25th Jan 2018 15:19 Edited at: 25th Jan 2018 18:22
I know ... I learned a lot from it back then
But I think these shaders only was faster because of less overhead with other words you gained performance by giving up on features.
If done well custom hard coded shaders will always be faster. Would like to hear with what you come up anyway

Login to post a reply

Server time is: 2024-04-18 01:16:15
Your offset time is: 2024-04-18 01:16:15