Ultimate shader collection!!!!

Posted By: Matt_Coles

Ultimate shader collection!!!! - 03/27/05 11:21

contains examples from free shaders donated to the community by mainly steempipe and Matt Aufderhiene then altered by me. Thanks guys

has parallax mapping, normal mapping, sort of spec mapping, bump mapping, cartoon rendering, soft dynamic shadows, bloom, and it's open source demo so it can be cut and pasted into any project easily

get it here: Ultimate shader pack



enjoy
Matt Coles
Posted By: Grimber

Re: Ultimate shader collection!!!! - 03/27/05 12:34

are they done for DX9? ( havn't tried them yet)

I got a couple shaders i got from shaders forum a while back but think they were done for DX8 because they no longer work. since I know zip on doing shaders i have to rely on what people post and hope they work.
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 03/27/05 13:19

Yeah, they're dx9, for A6 31.4
Posted By: SlyBoots

Re: Ultimate shader collection!!!! - 03/27/05 13:30

Quote:

Render_backbuffer not found in DLL



It seems like a great contribution though.
Posted By: fastlane69

Re: Ultimate shader collection!!!! - 03/27/05 14:05

Background nonwithstanding, that is a very cool screenshot!

Nice contribution!

Thanks!
Posted By: fastlane69

Re: Ultimate shader collection!!!! - 03/27/05 14:09

I got this error too like sly:

Quote:

Malfunction W1523: render_backbuffer not found in DLL





Posted By: Drew

Re: Ultimate shader collection!!!! - 03/27/05 15:24

excellent contribution, will try it sometime!
Parallax is the way to go! Experiment with the map to get different results, you will be surprised how deep it can go.
I've gotten what looks like 5-6 inches deep on a brick wall!
Be careful, you can easily streak the edges of the bumps by going too deep, the pixels stretch. Its amazing to actually see a brick 'block' another brick when you get close to a wall...Imagine a detail in the grout that you cant see when you get close to the wall...Its going to be amazing when parallax mapping makes it into retail games, we are ahead at this point...
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 03/27/05 15:43

The missing file is available here, just put it in your folder

Renderview DLL
Posted By: Stefan

Re: Ultimate shader collection!!!! - 03/27/05 17:30

Downloaded the dll and put it into my folder but still get the same error!
Posted By: Daedelus

Re: Ultimate shader collection!!!! - 03/27/05 17:38

same result
Posted By: William

Re: Ultimate shader collection!!!! - 03/27/05 18:13

Same problem here - In the meantime, if you want to test the demo without the bloom effect(and perhaps other effects as well...) just replace the "techex.wdl" code with this(same script only with the render parts commented out):

Code:
 var video_mode = 8;	 // screen size 640x480
var video_depth = 32; // 32 bit colour D3D mode

string level_str = <techex.WMB>; // give file names in angular brackets

dllfunction prototype;
dllfunction render_backbuffer(entity);

function main()
{
level_load(level_str);
freeze_mode = 1;
wait(4);
freeze_mode = 0;
//screengrab();
}

// Shader Part
var light_dist=700; //this is how far away form a light it will be visible.
action light_pos_object
{
wait(5);
my.invisible=on;
my.passable=on;


my.lightrange=700; //could be set also to a skill


my.red=128; //just put in the r,g,b values
my.green=128;
my.blue=128;

my.cast=on; //casts a shadow when on

}



//******************

bmap env_bmp=<env_map.bmp>;
bmap castle1_walls = <castle1_walls_t.tga>;
bmap castle1_walls_tDOT3 = <castle1_walls_tDOT3.tga>;
bmap castle1_walls_tH = <castle1_walls_tHeight.tga>;

material castle1_walls_t
{
skin2 = castle1_walls_tDOT3 ;
skin3 = castle1_walls_tH ;
flags = tangent;
}

material castle1_walls_2
{
skin1 = castle1_walls_tDOT3 ;
flags = tangent;
}

material castle1_walls_3
{
skin1 = castle1_walls_tDOT3 ;
flags = tangent;
}

material castle1_walls_4
{
skin1 = castle1_walls_tDOT3 ;
skin3 = castle1_walls;
skin4 = env_bmp ;
flags = tangent;
}
/*
/////////////////////////
// Bloom

material mat_bloom
{

}

entity glow_quad
{
type = <grey.TGA>; //128*128 works best but can be any size
//this entity is always invisible..
}

entity glow_quad_view
{
type = <grey.TGA>;
layer = 2; // display above view entities with layer 1
view = CAMERA; // same camera parameters as the default view
// set the x position according to the texture size..
// x = 36; // for 32
// x = 72; // for 64
x = 145; // for 128
y = 0; //center horzontally
z = 0; // and center vertically
}

function map_glow()
{
me=glow_quad_view;
my.ambient=10;
my.transparent=on;
my.bright=on;
my.alpha=50;
my.visible=on;
my.material=mat_bloom;
my.scale_x=1.33; //this scales it to screen proportions..
while(1)
{
//sets material skin1 to the rendered view tex
mat_bloom.skin1=bmap_for_entity(glow_quad,0);
wait(1);
}
}

function screengrab()
{
wait(20);
me=glow_quad;
map_glow();
while(1)
{
render_backbuffer(me);
wait(1);
}
}
*/
///////////////////
// Toon Shading

// Normaliser cubemap sprite
bmap bmp_normalizationcube=<tsnormalise.tga>;
// Paint shade map for toonshader
bmap bmp_tstonemap=<ts2tone.tga>; // <<< CHANGE THIS TO CHANGE PAINT SHADING

function mat_toon_init
{
bmap_to_cubemap(mtl.skin1);
}

material mat_toon
{
skin1=bmp_normalizationcube; // This is the normalisation cubemap created by the starter function
skin2=bmp_tstonemap;

flags=tangent;

event = mat_toon_init;
}

action Shader_Toon
{
//my.shadow = on;
//my.cast = on;
my.material = mat_toon;
render_shadows();
}

/*******************************************************
softshadows.wdl
(c)2005 Matt Aufderheide
*******************************************************/

string my_file;
string empty="";
string sourcefile;
entity* temp_ent;
var VecTo[3];
var VecFrom[3];

//change this for different LOD versions..
//here I am using the LOD 0 file ..
//however if you want, you can change it 1,2,3 to always have a
//low res model as your shadow..however it seems to work fine this way if you have LODs
//if you dont have LOD change this string to simply ".mdl"
string control_file="e.mdl";

//i have included this tga file
bmap softshadow_bmap = <shadow_color.tga>;

material mat_softshadows{}

//flatten the shadow to the ground normals
function shadow_to_normal()
{

temp_ent = YOU;

trace_mode = IGNORE_PASSENTS+ IGNORE_ME+ IGNORE_YOU+ IGNORE_MODELS;
vec_set(vecFrom,YOU.X);
vec_set(vecTo,vecFrom);
vecTo.Z -= 500;
result = trace(vecFrom,vecTo);

YOU = temp_ent; // YOU (the entity itself) is changed by SONAR

if(result > 0)
{
// place shadow 2 quants above the floor
MY.z = YOU.z - RESULT + 2; //YOUR.min_z*/ + 2 - RESULT;
MY.x = YOU.x;
MY.y = YOU.y;

// adapt shadow orientation to floor slope
if ((NORMAL.x != 0) || (NORMAL.y != 0))
{ // we're on a slope
// conform shadow to slope
MY.PAN = 0;
MY.tilt = - asin(NORMAL.x);
MY.roll = - asin(NORMAL.y);
temp.pan = YOU.PAN;
temp.tilt = 0;
temp.roll = 0;
rotate(my,temp,nullvector);
}
else
{
MY.pan = YOU.pan;
MY.tilt = 0; // set it flat onto the floor
MY.roll = 0;
}
}


}


//this function controls the far disnace you can see shadow
function shadow_vis()
{
while(me)
{
if (vec_dist(my.x,camera.x) > 1000) //adjust this dist here
{
my.invisible=on;
}

else

{
my.invisible=off;
}

wait(10+(random(5)));
}

}

//animate and move the shadow mesh
function shadow_mesh()
{
my.scale_x=your.scale_x;
my.scale_y=your.scale_y;
my.scale_z=your.scale_z;
my.scale_z*=0.01;

my.passable=on;
my.push=-1;

my.ambient=0;
my.transparent=on;
my.flare=on;
my.passable=on;
my.push=-1;

shadow_vis();

my.material=mat_softshadows;
mat_softshadows.skin1=softshadow_bmap;

my.skill41=float(0.4); // adjust this to increase blurriness..

while(me)
{

if you!=null
{
my.frame=your.frame;
my.next_frame=your.next_frame;
shadow_to_normal();
}

if you==null
{
ent_remove(me);
}

wait(1);
}

}

function render_shadows()
{
str_cpy(my_file,empty);
str_for_entfile (sourcefile, me);
str_trunc(sourcefile,5);
str_cpy(my_file,sourcefile);
str_cat(my_file,control_file);
ent_create(my_file,my.x,shadow_mesh);
}


///////////////////////
// Load Shaders

starter load_shaders()
{
d3d_automaterial=1;
effect_load(castle1_walls_t,"parallax.fx");
effect_load(castle1_walls_2,"normalmap_level_ps20.fx");
effect_load(castle1_walls_4,"spec_mapworld.fx");
effect_load(castle1_walls_3,"bumpmap.fx");
//effect_load(mat_bloom,"bloom.fx");
effect_load(mat_toon,"toon.fx");
effect_load(mat_softshadows,"softshadow.fx");
}



Thanks for the great demo Matt!
Posted By: task1

Re: Ultimate shader collection!!!! - 03/27/05 19:11

works great!
Posted By: old_bill

Re: Ultimate shader collection!!!! - 03/27/05 22:15

Very nice and usefull collection, thanks for sharing!

old_bill
Posted By: Locoweed

Re: Ultimate shader collection!!!! - 03/28/05 04:26

Great contribution!

Just need to get that render_backbuffer not found corrected. It is still there even after you add the DLL file.

Loco
Posted By: Braxton

Re: Ultimate shader collection!!!! - 03/28/05 06:02

I can't get the mat_toon to work in my game. How can I fix this?
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 03/28/05 09:34

solved the renderview dll problem, you can't have the dll in the game folder as it comes up with this error, you have to place it in the main gamestudio folder under acknex_plugins for the engine to read the dll.

Braxton: What exactly is happening with your toon shading? Do you get anything error messages on screen or is the shader just not showing?

Matt Coles
Posted By: SlyBoots

Re: Ultimate shader collection!!!! - 03/28/05 10:31

That helped, thanks again.
Posted By: Rhuarc

Re: Ultimate shader collection!!!! - 03/28/05 11:20

Quote:

Braxton: What exactly is happening with your toon shading? Do you get anything error messages on screen or is the shader just not showing?




His card probably doesn't support it, takes some of us a while to realize that

-Rhuarc
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 03/28/05 12:19

I would have thought it to have worked though, if the all the other shaders worked.
Posted By: Locoweed

Re: Ultimate shader collection!!!! - 03/28/05 14:24

Ah, yes, we should have known, it's the dll must be read by the engine from the acknex_plugins folder error.

Thanks, this is a very nice colection all put into one nice neat script.

Loco
Posted By: Daedelus

Re: Ultimate shader collection!!!! - 03/28/05 16:56

Quote:

Thanks, this is a very nice colection all put into one nice neat script.




Couldn't have said it better. It will definitely make life a little easier as I am new to using shaders.
Posted By: Wiz

Re: Ultimate shader collection!!!! - 03/28/05 21:19

Really cool! And for the first time all these shaders are working for me(probably my mistake...).
I will now try to put all this new knowledge into good use!
Posted By: Braxton

Re: Ultimate shader collection!!!! - 03/29/05 05:54

@ Mat_Coles - My card is good enough, it just doesn't show a shader in the game.
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 03/29/05 07:42

What sort of card is it Braxton?
I've only tried ATi cards and I might test it to see what happens on a NVidia
Posted By: Daedelus

Re: Ultimate shader collection!!!! - 03/29/05 08:40

Possible Renderview.dll problem..
If I save my game in an outdoor level with a skycube and reload that saved file, everything looks fine.
But, if I close Gamestudio, reload the saved game file, the sky is black.
I pulled the renderview .dll out of the plug-ins folder and the sky now loads fine with the sky fully visible.

I am using an Nvidia Geforce FX 5500.
Can someone verify this? I don't know if its my system or card.
Thanks

BTW- Everything works perfectly with the shaders though.
Posted By: FeiHongJr

Re: Ultimate shader collection!!!! - 03/30/05 11:23

hmmm my graphix card must not support it cause after i got the dll in the right place it opens waits a second then the entire screen turns white i cant wait till i get a new graphix card thanks for the contribution tho. when dx20 is out ill probally be able to use it
Posted By: muralist

Re: Ultimate shader collection!!!! - 06/11/05 18:28

Hi Matt,
Thanks for the collection. The demo runs fine, I removed bloom and toon, but the parallax and normal, bump, and spec look great. When I load these in my level (newest A6 Shooter Template) the normal and parallax do not work. Any ideas on how to get these effects in my level?
Posted By: XNASorcerer

Re: Ultimate shader collection!!!! - 06/11/05 20:25

Hi.
The link is dead. Could you upload it again?
Thanks
Posted By: muralist

Re: Ultimate shader collection!!!! - 06/11/05 20:41

Socrcerer, you can download at

http://coniroot.de/~pirvu/au/scripts/shadercollection.zip
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 06/11/05 23:01

You have to make the wad textures "flat" instead of "shaded" in the level and you have to have dynamic lighting near them. This should fix the problem

MattColes
Posted By: muralist

Re: Ultimate shader collection!!!! - 06/11/05 23:31

Thanks Matt, I will do that now.
Posted By: muralist

Re: Ultimate shader collection!!!! - 06/12/05 00:05

I made them flat but they're still solid black.
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 06/12/05 00:53

You don't have fog incorporated into your project, that could be one thing, also have a go with playing with the sunlight variables, these two things were problems I ran into with the shaders on walls turning into black blocks
Hope that helps,

Matt Coles
Posted By: muralist

Re: Ultimate shader collection!!!! - 06/12/05 01:01

Thanks -- I'll adjust the fog and Im using Loopix' day_night wdl (though I tried to turn it off and still no luck. I'll mess with variables and see what works. Thanks again.
Posted By: Inestical

Re: Ultimate shader collection!!!! - 06/13/05 11:29

the download isn't working
Posted By: nightshade

Re: Ultimate shader collection!!!! - 06/28/05 16:25

Yeah I searched with the search-function... and now? Please reupload the download, thanks!
Posted By: Sebe

Re: Ultimate shader collection!!!! - 06/28/05 16:35

the shader collection can be found @ AU
Posted By: nightshade

Re: Ultimate shader collection!!!! - 06/29/05 11:10

lol ok, then I've to search..
Achja, LordSebe, bei au brauch ich 1000 jahre bis ich was find;) naja was solls.. ne suchmaschine für die aum's wäre gut!

EDIT : Nö nix is da, hab alles nachgeschaut !
Posted By: mpde

Re: Ultimate shader collection!!!! - 06/29/05 11:37

Hallo...

AU = Acknex Unlimited, hier der download Shader-Collection immer richtig suchen.

mpde
Posted By: nightshade

Re: Ultimate shader collection!!!! - 06/29/05 14:55

Aso, wusste net das er Acknex Unlimited meinte, sorry^^ und danke:).
Posted By: Hellcrypt

Re: Ultimate shader collection!!!! - 11/19/05 15:13

Can someone link the render_backbuffer dll?
Posted By: zefor

Re: Ultimate shader collection!!!! - 11/24/05 14:47

I would also like the dll please.
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 11/24/05 21:36

Here is the link:

www.lastwake.com/renderview.zip
Posted By: zefor

Re: Ultimate shader collection!!!! - 11/25/05 02:08

Thank you Matt.
Posted By: Hellcrypt

Re: Ultimate shader collection!!!! - 11/25/05 03:13

thanks, although matt(the other one) told me that he was not distributing it anymore.
Posted By: Matt_Coles

Re: Ultimate shader collection!!!! - 11/26/05 21:00

That's because he has the Sphere Engine that has those features now.
© 2024 lite-C Forums