Shaders!

Posted By: Slin

Shaders! - 05/22/08 18:58

This Shader collection even if not finished because of all the already existing problems was a lot of work and thus it would be very nice if you could give me credits if you are using it, but it is not needed.

If you want to support me, I have always some free space for good looking models and textures :P

The whole pack is splitted into two folders:
-Postprocessing Shaders
-Object Shaders

Both have to be included into your project as well as the PP_Main.h and the OS_Main.h.
Each shader needs the _Helper.c file to run, other than that they are all working absolutly independant of each other. Some of the shaders have fallback which is automatically used if the better shader is not supported.
To use one of the shaders you just have to call its Shadername_Init(some parameters) function. For the postprocessing shaders there are also functions to make it fit to a new screenresolution.

The OS_O_Shadername.c are meant for outdoor scenes supporting the sun. OS_I_Shadername.c is meant for indoor scenes without sun.
OS_CO_Shadername.c and OS_CI_Shadername.c are the same but with clipping. Those shaders should be used when you have water within your level.

For more information have a look at the files.


I hope you like it smile

If you have any problems, post it here smile



Nils Daumann


Here is a screenshot of the collection in action:



And finally the downloadlink .
Posted By: Anonymous

Re: Shaders! - 05/22/08 19:55

wow. Thank you very much
Posted By: indiGLOW

Re: Shaders! - 05/22/08 20:07

I Have been watching the development of this very closely. Congratualtions and appreciation for the effort and excellent contribution.

Please see my PM
Posted By: Kasey_Dee

Re: Shaders! - 05/22/08 23:42

Thank you Slin! I call Loopix the Master of Plants so you must be our Master of Shaders. smile

For those of us who are terrible at doing shaders it would be nice also to have someone do shader packs of various types like different water and other effects and sell them in packs. I am surprised there is no one selling shader packs. Maybe have the community put in requests and someone make them and sell them.
Posted By: PHeMoX

Re: Shaders! - 05/23/08 00:24

As always, thanks a lot for the contribution Slin!

Originally Posted By: Kasey_Dee
For those of us who are terrible at doing shaders it would be nice also to have someone do shader packs of various types like different water and other effects and sell them in packs. I am surprised there is no one selling shader packs. Maybe have the community put in requests and someone make them and sell them.


I have thought about doing that way back when I contributed a post-processing shader pack, but not that many people would really pay anything for the shaders when it comes down to it. In fact, I'm glad a lot of people now decide to simply contribute them for free and some forum-fame instead!! It's important that people learn from each-other this way and if you do some research on the internet there isn't thát much that you can't find for free shader-wise.

Of course, getting it all to work in 3dgs is a little bit different...
Posted By: Kasey_Dee

Re: Shaders! - 05/23/08 13:41

Originally Posted By: Kasey_Dee
I have thought about doing that way back when I contributed a post-processing shader pack, but not that many people would really pay anything for the shaders when it comes down to it.


I would gladly pay for anything that would help free myself so I could work on other aspects of my game. Especially areas I am weak in. Plus I can work on aspects of the game that I particularly enjoy.

Maybe some shader people would be open to custom work as well. Once IntenseX AI is released and I can see if I can integrate the scripts to work with Mysty Moods I will see what shaders I need and post in the jobs forums.
Posted By: frazzle

Re: Shaders! - 05/23/08 19:10

Always very useful and learnful Slin smile smile
Nice shader collection you assembled up to now wink wink

Cheers

Frazzle
Posted By: Quad

Re: Shaders! - 05/23/08 20:27

i really like the raidal blur laugh dont know why but it makes want to play Assasins Creed.
Posted By: William

Re: Shaders! - 05/24/08 01:45

Thanks for your work Slin. smile
Posted By: Slin

Re: Shaders! - 05/31/08 18:02

Thank you all for your nice words smile

Quote:

For those of us who are terrible at doing shaders it would be nice also to have someone do shader packs of various types like different water and other effects and sell them in packs. I am surprised there is no one selling shader packs. Maybe have the community put in requests and someone make them and sell them.

That is basicly what I planed for this pack, but gave up on making it bigger because I am somehow not able to get the heat refraction to work on other systems than mine...
Posted By: VeT

Re: Shaders! - 06/09/08 14:49

i tried to add your water from Water.c , but got error

Posted By: Slin

Re: Shaders! - 06/09/08 20:02

How do you assign the shader?
Posted By: VeT

Re: Shaders! - 06/09/08 20:12

just added action Env_Water_act() to flat model...
Posted By: Slin

Re: Shaders! - 06/09/08 20:25

in a lite-c project? and you made sure, that the WaterBump.tga (or similar) is there?
Posted By: VeT

Re: Shaders! - 06/09/08 20:30

yes, i even moved that file to shader folder...


crash comes from string
Code:
	OS_Water_init(my,Env_Water_Bump_bmap,Temp_bmap,my.skill1,my.skill2,my.skill3,my.skill4,2,1024,1024);

Posted By: VeT

Re: Shaders! - 06/09/08 20:40

really, i need just refraction shader for glass... maybe there is another way? smile
Posted By: Slin

Re: Shaders! - 06/09/08 21:04

Ahh, I guess that temp_bmap isn´t set.
You will have to generate it first. Btw, there is also a refraction shader in the pack, OS_HeatHaze.c.
Posted By: VeT

Re: Shaders! - 06/09/08 21:43

heh, its really magic collection of shaders :))
thanks, i'd look through OS_HeatHaze.c
Posted By: VeT

Re: Shaders! - 06/09/08 22:26

and what is temp_bmap, just clear bmap or skybox?
Posted By: Slin

Re: Shaders! - 06/10/08 12:57

it is streched over the whole waterterrain and defines how much refraction is used at each pixel. This map will be autogenerated if you take away the comment marks in the line above.
Posted By: VeT

Re: Shaders! - 06/10/08 18:02

hm.. now i dont get error, but water now is fully unvisible...

also, your project may work only with one water(if only one file is generated), or it generates for every water?

and last one: couldnt you show, how to use PP_HeatHaze_init for one model of glass? may i also generate refraction picture or there is more simple method to make 4 different glasses?
Posted By: Slin

Re: Shaders! - 06/10/08 21:45

You have probably choosen some bad parameters for the blendmapgeneration. The file can be generated for as many water planes you want. Look at OS_HeatHaze, not PP_HeatHaze. I will give an example tomorrow.
Posted By: VeT

Re: Shaders! - 06/11/08 11:52

okay, thank you, i'll wait... and look through OS_HeatHaze smile
Posted By: Slin

Re: Shaders! - 06/11/08 12:27

Code:
BMAP* Haze_map = "PP_HeatHaze.tga";
BMAP* Blend_map = "Blend.tga";
action Eff_HeatHaze()
{
	set(my,PASSABLE);
	OS_HeatHaze_init(my,Haze_map,Blend_map,512,3,0,0.02);
}


Haze_map is the normalmap used for disorting which will be shiftet with the speed given by two of the parameters, Blend_map sets the disortion strength and transparency.
Posted By: chochi

Re: Shaders! - 06/14/08 04:49

Woah!
Thank you very much for your work!
All i need now is something to put this babes on cool
Posted By: VeT

Re: Shaders! - 06/14/08 14:40

hell.. again errors... maybe i disunderstood something, but here is what i get




on the top is result(just some vertical lines on the glass), haze map is in the middle, blend is in bottom...
Posted By: Emre

Re: Shaders! - 07/16/08 13:22

Thank you very much, Slin!

I like DOF effect. It's perfect!
Posted By: ACb

Re: Shaders! - 03/21/09 07:00

Thanks slin for ur shaders...help me alot in my school assignments smile
Posted By: krial057

Re: Shaders! - 06/05/09 12:32

The downloadlink isn't working cry
Posted By: Slin

Re: Shaders! - 06/05/09 13:17

Here is a new one: http://slindev.com/files/projects/Shaders!.zip
Posted By: krial057

Re: Shaders! - 06/05/09 17:25

Thx a lot.
I have tried out the "OS_Water" shader. But I don't understand what I shoult enter in the "OS_WATER_INIT_action. What should be on the image of the blendmap ? the places, where the water is connected with the coast? when yes, which colors should I take for that? And what do you mean wit ReflectRes and RefractRes. I have tried out some numbers, but I always recived the message, that ther invalid arguments in it. frown

I hope you can help me... confused
Posted By: Slin

Re: Shaders! - 06/08/09 13:20

@krial057: Just use my water.c example code...

I just uploaded an updated version which should run a bit faster. Also the postprocessing effects should now work independant from the views arc.
You can download it here: http://www.slindev.com/files/projects/Shaders!%20V2.zip
Posted By: krial057

Re: Shaders! - 06/08/09 14:31

I'm still getting the error:
"Error E1515
Invalid arguments in OS_Water_RefractView_init".
I can't see the water too. I can just reconize a blur-effect, but it is everything transparent (I also tested it by including your main.c... same error-message frown )



Posted By: Nowherebrain

Re: Shaders! - 07/09/09 19:52

missing pointer to the render target....I'm guessing.
Posted By: 3run

Re: Shaders! - 02/06/12 00:25

is there anyway to reupload this stuff?
Posted By: Slin

Re: Shaders! - 02/06/12 08:56

http://files.slindev.com/codes/Shaders!%20V2.zip
Posted By: 3run

Re: Shaders! - 02/06/12 09:39

Edit: thank you very much, very easy to use and fast enough.
Posted By: 3run

Re: Shaders! - 02/06/12 23:56

Slin, sorry for double post, but I've found some problem with motion blur. When I limit fps at 60, it blurs to much (changed in loop wait(-0.001);), but when I remove fps_max it works as it should. How can I solve this?
Posted By: Rondidon

Re: Shaders! - 02/07/12 00:03

I added the link to the Gamestudio Wiki
http://www.opserver.de/wiki/index.php/Shaders
© 2024 lite-C Forums