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 Chat / [STICKY] Useful Community Shaders Project

Author
Message
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 19th Jun 2017 21:18
Something like this:
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 21st Jun 2017 07:16
@janbo: You are doing a great job, thanks
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 21st Jun 2017 17:33
Agree with @george++ in fact I didn't realize @janbo was creating a shader pack for us. This is awesome! Makes me think although I've enjoyed getting into the shader programming it would make more sense to focus on other things.

Thanks @janbo it is very awesome of you to do this. Anything that can save others development time is a great thing.
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: 21st Jun 2017 18:20 Edited at: 15th Jul 2017 01:32
Wow thanks,
A few years ago I admired the people who could write such nice shaders.
But I did't stop learning about them and now I really like the shader stuff.
Right now i'm diving into deferred rendering although OpenGL ES 2.0 isn't the best for it, as it doesn't support MRT(MultipleRenderTargets) and some functions for glsl. (Maybe it's possible via gl_FragData[n] and an Opengl extension.)
I have to make some bypasses here and there.
It's of course not TGC's fault, but Paul could make it easier if he implements a way to create, calculate and pass matrices to shaders in AppGameKit also I would like to access AGK's calculated Matrices from within the code...
So +1 for advanced Math in AGK... again
But with Deferred Rendering I could implement SSAO(ScreenSpaceAmbientOclusion) and SSD(ScreenSpaceDecals) much more efficient and easy.
It's not the best for mobile platforms as it does have a bigger overhead than forward rendering(even with MRT's) but you could get all the techniques of the big engines like Unreal and Unity.

Anyhow I can't promise anything for now as it's still a hobby for me like most of us.
I hope you are not too shocked when I tell you, that I hope to earn a little bit money from the pack.
Would you guys buy it ? and what would you spend if I can make some different shader effects + brush up all my old shaders.
I will not take the old shaders from the web, everything you'd get would be new or polished.
And of course I still try to help you guys for free and don't throw everything into the pack.


Deffered Rendering Preview
Normalmapping + Specularmapping


Quote: "I didn't realize @janbo was creating a shader pack for us"

I didn't talk about it, so you could not...

[Edit]
hoyoyo80 wrote: "Something like this:"

Will that work for you ?

Have you tried the other solution ?
[/Edit]

Using AGKv2 Tier1

Attachments

Login to view attachments
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 21st Jun 2017 23:01 Edited at: 21st Jun 2017 23:07
Looks and sounds great to me personally and as long as you make it super easy to use and priced reasonably (like $20 or less) I'd have no problem buying it if you put it on the Asset Store.

Heck yeah things like this a person deserves to make some money. Can't expect someone to spend their own personal time and then just give everything that comes out of that effort away for free. Now little itty bitty things sure. But not a pack of useful shaders like this. That is sellable IMO.

Actually even the little itty bitty things if priced little itty bitty like $1 or less. To me it all depends on how well executed things are. If selling it then it should be super easy to use and not require a bunch of time and effort in addition to requiring paying for it to begin with.
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)
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 21st Jun 2017 23:23
@janbo, the code given previously work, but look like a little the model have a light trail with it..
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 22nd Jun 2017 04:35 Edited at: 15th Jul 2017 01:32
@GarBenjamin: I'm planing to create little projects using the bare minimum to show of and understand each shader and one huge where every shader is used and encapsulated in an user friendly library.

@hoyoyo80: Sound like you are using it on an animated object... they don't work well with scaling(you could try to create a separate object and scale it permanently) ... anyhow I made a shader for it now and the result is what you can see in the gif above

Using AGKv2 Tier1
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 22nd Jun 2017 06:16
Quote: " anyhow I made a shader for it now and the result is what you can see in the gif above"


Yayyy!!! Yes, im using it with animated object...Thanks...

Side note: Maybe all the shaders made can be incorporate in official agk2, and whoever contribute get something from it.
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 22nd Jun 2017 17:53
@janbo: of course I would spend some money for a shader pack since it extends the functionality of AGK.
AGK so far offers the car without wheels. A shader pack is the wheels
Arbrakan
7
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 24th Jun 2017 08:17
A shaders pack will be awesome !
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Jul 2017 05:00
I have a question. I had a look at Blendman's awesome shaders for blending two textures onto the one object.
Can anyone help me to expand that to being able to blend a smaller texture onto a larger texture.
basically i just want to be able to blend a shadow onto a ground plane.
so i imagine it would be similar to the examples he has posted but with an offset and orientation.
any help would be greatly appreciated
thanks
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 3rd Jul 2017 13:05 Edited at: 15th Jul 2017 01:32
You need to add "uv1Varying = uv * uvBounds1.xy + uvBounds1.zw;"
Like so:

blend.vs
+ Code Snippet
blend.ps
+ Code Snippet
AGK Code (play with uvscale and uvoffset in stage 1)
+ Code Snippet

Using AGKv2 Tier1
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Jul 2017 01:03 Edited at: 4th Jul 2017 02:23
That's fantastic janbo, thanks heaps.
That solves the position issue but how would i rotate the shadow texture?

ps: i'm not sure this is the right approach as it will limit the shadows to 8 objects. i'm wondering if i can pass the bounding points of my objects (they will always be rectangular) and the shader could just darken those areas?
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 4th Jul 2017 13:58 Edited at: 15th Jul 2017 01:32
Well, a real shadow shader or projected decals could be the way to go
We have had that 8 shadow limit also with lights and other stuff in the game industry... they only showed the nearest lights ...so you could do the same for shadows I guess... but I don't know your game.
With deferred rendering we don't have this problem
blend.vs
+ Code Snippet

Using AGKv2 Tier1
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 4th Jul 2017 23:30
Thanks janbo. That helps a lot
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 6th Jul 2017 17:04 Edited at: 15th Jul 2017 01:32
As I plan to make a 3D Shader Pack, what would you like me to add to the shader pack.
I have these Shaders ready but have to wrap them in to some nice functions and test if they interference with the other Shaders
•Updated Water Shader
•Normalmapping Shader
•Shield Shader
•See Through Shader
•Outline Shader
•Fur Shader

I like this cuddly bundle of fluff (the hair moves if you move the fluffy ball)
I imagine it with big eyes and little stick legs.. so cute

Those shaders are forward rendering only, for now
I don't work on my shadow shader as Paul will add shadows to AGK

I looked into normal mapping and lighting for deferred rendering(have a little test project which looks right but it is not )
I looked into screen space ambient occlusion and screen space decals... I might add this to the pack if I get deferred rendering working

Using AGKv2 Tier1

Attachments

Login to view attachments
Arbrakan
7
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 6th Jul 2017 21:21
PBR Shaders ? :p

Thanks a lot for your work, instabuy when it come out !
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 6th Jul 2017 22:17 Edited at: 15th Jul 2017 01:32
Quote: "PBR Shaders ?"

Well I could add a Specularmap, Roughnessmap and Ambientocclusionmap to the Normalmapping one...I think thats all you gonna need for PBR...
I have a little problem there, as we have limited amount of textures, and if I add the agk shadows later or matalicness I want to reflect the cubemap on the surface...for now we have to pass a texture for each side of the cubemap...
Hm...Or we compress it into hemispheres and pass 2 textures... then I would have PBR in forward rendering with one spare texture to mask something for example
I'll look into it
Diffuse/Albedo
Normal
Specular/Metalicness
Roughness
Ambientocclusion
And the two Dual-Paraboloid ones

That gonna be no mobile games you make with this shader

Using AGKv2 Tier1
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 7th Jul 2017 05:14 Edited at: 7th Jul 2017 05:15
I'll be your first customer!
As a hobbyist programmer, shadows, normal maps, water, outline shaders are OK
A glowing effect on individual objects will be a good addition for me
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Jul 2017 13:45 Edited at: 15th Jul 2017 01:32
Is single Glowmap ok ?
Or do I have to create every single combination of shader myself ? should I make it Glow+Normalmapping ?
You can achieve the glowing effect with the bloom shader from the examples, but I will make the little masking part of the glow map for you.
I forgot about my Dissolve shader I'll add it to the Pack too

(The effect is not not perfect jet)
It gets the diffuse texture a color ramp and the NoiseMask

Using AGKv2 Tier1

Attachments

Login to view attachments
george++
10
Years of Service
User Offline
Joined: 13th May 2007
Location: Hellas
Posted: 7th Jul 2017 16:14
Could you please describe the difference between the single glow map and the combination (with normal map)?
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 7th Jul 2017 17:55 Edited at: 15th Jul 2017 01:32
Aw... I wrote a very long text to explain you why I don't want to end up writing 49 different shaders if I combine every shader I have now, but I accidentally reloaded the page
So there is no easy way to combine shaders except of some genius shader code generation I don't know of and a mix of deferred and forward rendering which only saves you from writing the PBR code again.
You know Normalmapping and you know Glowmaps and you don't want to write one big shader which includes every single effect because glsl isn't good in branching and hardcoding is still the fastest method...
So you have to make a combination manually if you need it in you scene.

I better aim for easy access and understanding then writing every combination I can imagine.
Thats all, it's just combining them

Actually I don't care too much about writing all shader combination than the AppGameKit part behind it... but I'm not at that point(maybe it's easy)

Have the diffuse,normal and specular part of the PBR shader

Using AGKv2 Tier1

Attachments

Login to view attachments
GarBenjamin
1
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 7th Jul 2017 18:17
Looking fantastic so far. Any idea you have in mind for when this will be released? Do you think it might be ready by August or are you thinking more towards end of the year?
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: 7th Jul 2017 18:54 Edited at: 15th Jul 2017 01:32
As I know me... its like more towards end of the year.
I try to aim shorter

[Edit] I would like to know what exactly is inside "mediump vec3 GetVSLighting( mediump vec3 normal, highp vec3 pos );" anybody have an Idea how I get at it ? [/Edit]

Using AGKv2 Tier1
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 10th Jul 2017 17:49 Edited at: 15th Jul 2017 01:33
Having PBR working for PC :
The Floor is PBR(using Diffuse,Normal,Metal,Roughness and AO) and the right sphere is Normal+Specularmapping: See Attachments

But I will not investigate in a PBR shader or shadow shader anymore as TGC have plans to provide their own.
I already wrapped most of the functions for the other shaders of ASK(AppShaderKit)...progress is faster than I thought.

Using AGKv2 Tier1

Attachments

Login to view attachments
Arbrakan
7
Years of Service
User Offline
Joined: 10th Oct 2010
Location: Geneva
Posted: 10th Jul 2017 21:02 Edited at: 10th Jul 2017 21:06
So beautiful ! Thanks janbo !

Good news to hear that TGC have plans to provide it !!
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Jul 2017 22:54
Is there a shader that supports transparency in textures?
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Jul 2017 12:54 Edited at: 15th Jul 2017 01:33
If you use SetObjectTransparency(ObjectID,1) AppGameKit will generate one for you so, yes there is...
Or I misunderstood you !?

Using AGKv2 Tier1
nz0
AGK Developer
10
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 14th Jul 2017 00:12
Great work Janbo - I would be happy to support your shader pack.
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Jul 2017 01:43 Edited at: 14th Jul 2017 01:44
Quote: "If you use SetObjectTransparency(ObjectID,1) AppGameKit will generate one for you so, yes there is...
Or I misunderstood you !?"


I would like the "white" area at the base of that tree to be transparent (It is transparent in the texture sheet for the model). I tried setobjecttransparent() but i got the results shown.

Attachments

Login to view attachments
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 14th Jul 2017 12:41 Edited at: 15th Jul 2017 01:33
Try SetObjectDepthWrite(ObjectID,1) + SetObjectTransparent(ObjectID,1)

Using AGKv2 Tier1
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 14th Jul 2017 22:49
No luck. The real issue is that the white area at the base of the tree should be transparent. It's transparent in the texture
I attached the model and texture

Attachments

Login to view attachments
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Jul 2017 02:54 Edited at: 15th Jul 2017 02:54
I found no transparency in the texture at all
I'll try it next this morning ...to be sure

Using AGKv2 Tier1
blink0k
AGK Developer
4
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 15th Jul 2017 08:23
I'm such a fool!!!!! Sorry to waste your time janbo
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 15th Jul 2017 12:02 Edited at: 15th Jul 2017 12:03
No problem, I had those times too
I'm glad you found your problem...looks like a nice project

Using AGKv2 Tier1
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 24th Jul 2017 17:07
I made a thread for AppShaderKit in the Showcase section so I can flood you with some new Images and Videos

Using AGKv2 Tier1
hoyoyo80
1
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 25th Jul 2017 12:07
Cant wait for outline
Mobiius
Valued Member
14
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Aug 2017 13:10
Has Janbo or anyone released a fur shader?

I'd like to use it for a grass effect since i've decided to start coding again, and want to restart my VR Zelda game.
Signature removed by mod because it's larger than 600x120... please resize and try again.
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 11th Aug 2017 18:16 Edited at: 12th Aug 2017 02:09
Yes I have
It's part of my App Shader Kit which is in progress and will hopefully be available as a Steam-DLC soon after the AGK's Virtual-Editor is released.

Using AGKv2 Tier1
Westa
6
Years of Service
User Offline
Joined: 28th Oct 2011
Location:
Posted: 2nd Sep 2017 04:48 Edited at: 2nd Sep 2017 04:55
While searching for some image processing shaders - came across this great set of photoshop style processing resources:

Levels, Gamma, HSL, Blending

+ Code Snippet
RickV
TGC Development Director
17
Years of Service
User Offline
Joined: 27th Apr 2000
Location: United Kingdom
Posted: 17th Jan 2018 15:27
Post to unlock the thread.
Development Director
TGC Team
janbo
9
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 17th Jan 2018 15:43 Edited at: 17th Jan 2018 15:47
Ha thanks Rick,
I post the shader though it is not too useful, but maybe I can encourage someone playing with shaders again.

I converted Game Of Life into shader code.
You could also convert the A* pathfinding algorithm into GLSL, but to make use of it you would need to read the pixel color via memblocks and thats what I call dirty coding ^^
Should be very fast still.
Image


Shader
+ Code Snippet
Demo
GameOfLife.zip

Attachments

Login to view attachments

Login to post a reply

Server time is: 2018-01-21 12:25:17
Your offset time is: 2018-01-21 12:25:17