Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 1,405 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
massive shader collection... #338984
08/23/10 14:03
08/23/10 14:03
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
is anyone familiar with this collection? for the first time i tried to use some of the effects and i keep getting an error, and the effect wont load. i am trying to use the water refract code that adds the fake refraction that simulates underwater caustics and lights. does anyone know how to use it properly. the error is coming from the mtlFX.wdl. it says too many instructions for a slot or something. slot uses 128 but there are 134 instructions, whatever that means, lol.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: massive shader collection... [Re: Blink] #338985
08/23/10 14:08
08/23/10 14:08
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
btw, here is the code if you arent sure what i mean.

Code:
////////////////////////////////////////////////////////////////////////
// A6 main wdl:
//		Created by WED.
////////////////////////////////////////////////////////////////////////


path "C:\\Program Files\\GStudio6\\template_6";
path "C:\\Program Files\\GStudio6\\template_6\\code";
path "C:\\Program Files\\GStudio6\\template_6\\images";
path "C:\\Program Files\\GStudio6\\template_6\\sounds";
path "C:\\Program Files\\GStudio6\\template_6\\models";

string level_str = <shaders.WMB>;


include <gid01.wdl>;
include <display00.wdl>;
include <default.fx>;
include <mtlFX.wdl>;



function main()
{
	freeze_mode = 1;
	gid01_level_state = gid01_level_not_loaded;


	mouse_mode = 0;

	wait(3);

	level_load(level_str);

	wait(2);
	gid01_level_state = gid01_level_loaded;


	freeze_mode = 0;

	wait(6); 
	
	camview1();
	
	while(1)
	{
		MOUSE_POS.X = POINTER.X;
		MOUSE_POS.Y = POINTER.Y;
		
		if(gid01_level_state != gid01_level_loaded)
		{
			freeze_mode = 1;
			while(gid01_level_state != gid01_level_loaded){
				wait(1);
			}
			freeze_mode = 0;
		}
		wait(1);
	}
}

bmap flat = <blanknormalmap.tga>;

bmap gray = <grey2.tga>;

bmap black = <black.bmp>;

bmap waterheight = <waterheight.tga>;

bmap waterlight = <water_light.tga>;

var water_level=1;


material fake_refract
{
	skin2=gray;
	
	skin3 = waterheight;
	skin4 = waterlight;
	
	effect = "fake_refract.fx";
}

action light1{
	my.invisible = on;
	my.passable = on;

	my.red=35;
	my.green=32;
	my.blue=28;
	my.lightrange=15000;

}

//action: fx_water_env
//title: Faked water refraction
//skill1: Tile_x 1.0
//skill2: Tile_y 1.0
//skill3: Refraction_strength 1.0
//skill4: Refraction_tiling 2.0
action refract{
	var tile_tex_x=1;
	var tile_tex_y=1;
	var strength=1;
	var refract_tile=2;
	
	if(my.skill1==0){
		my.skill1=tile_tex_x;
	}
	if(my.skill2==0){
		my.skill2=tile_tex_y;
	}
	if(my.skill3==0){
		my.skill3=strength;
	}
	if(my.skill4==0){
		my.skill4=refract_tile;
	}
	
	my.skill41=float(my.skill1);
	my.skill42=float(my.skill2);
	my.skill43=float(my.skill3);
	my.skill44=float(my.skill4);
	
	while(1){
		if(my.z<water_level+100){
			my.material=fake_refract;
		}
		else{
			my.material=null;
		}
		wait(1);
	}
}

function camview1{
	var move[3];
	
	player=ent_create("ball.mdl",vector(168,-184,68),null);
	player.passable=on;
	
	camera.pan=160;
	camera.tilt=-24;
	
	while(1){
		
		camera.pan -= 14 * mouse_force.x*time;
		camera.tilt = clamp(camera.tilt+8 * mouse_force.y*time,-90,90);
		
		vec_set(move,nullvector);
		
		if(key_w){
			move.x=15*time*(key_shift+1);
		}
		if(key_a){
			move.y=15*time*(key_shift+1);
		}
		if(key_s){
			move.x=-15*time*(key_shift+1);
		}
		if(key_d){
			move.y=-15*time*(key_shift+1);
		}
		
		player.pan=camera.pan;
		player.tilt=camera.tilt;
		player.roll=camera.roll;
		
		c_move(player,move,nullvector,glide+ignore_passable);
		vec_set(camera.pos,player.pos);
	 	wait(1);
	}
}

bmap bmp_envcube1=<envi_snow+6.tga>;
bmap rainbow=<waves2.tga>;

function mtl_env_init()
{
 	bmap_to_cubemap(mtl.skin1);

	while(1) {
		mat_set(mtl.matrix,matViewInv);
		mtl.matrix41 = 0;
		mtl.matrix42 = 0;
		mtl.matrix43 = 0;
		wait(1);
	}
}

material water{
	skin1=bmp_envcube1;
	skin2=rainbow;
	event = mtl_env_init;
	flags=tangent;
	effect="ocean.fx";
}

action lightray{
	my.passable=on;
	
	my.unlit=on;
	my.bright=on;
	my.transparent=on;
	my.scale_z=25;
	my.scale_y=random(2)+.5;
	
	my.skill1=random(360);
	my.skill2=random(4)+6;
	
	while(my.skill3==0){
		my.pan=camera.pan+180;
		my.tilt=0;
		my.roll=0;
		ang_add(my.pan,vector(0,35,0));
		
		my.skill1+=my.skill2*time;
		my.alpha=12*sin(my.skill1)+2;
		wait(1);
	}
}




material dof{
	effect = "blur.fx";
}

action d_o_f{
	my.transparent=on;
	my.material=dof;
}

sky outside{
	type=<sky_day2_small+6.tga>;
	layer=2;
	z=20;
	flags=cube,visible;
}

material mblur{
	effect = "motionblur.fx";
}

action motionblur{
	my.transparent=on;
	my.material=mblur;
	
	var cam_pos[3];
	var cam_x_change;
	var cam_y_change;
	var cam_pan_change;
	var cam_tilt_change;
	var cam_pan;
	var cam_tilt;
	while(1){
		my.skill41=float(-cam_pan_change*2+cam_y_change);
		my.skill42=float(-cam_tilt_change*2);
		my.skill43=float(cam_x_change);
		
		cam_pan_change=camera.pan-cam_pan;
		cam_tilt_change=camera.tilt-cam_tilt;
		vec_add(cam_pos,my.pos);
		
		vec_sub(cam_pos,camera.pos);
		
		vec_rotate(cam_pos,vector(-camera.pan,-camera.tilt,-camera.roll));
		cam_x_change=cam_pos.x/vec_dist(my.pos,camera.pos)*300;
		cam_y_change=cam_pos.y/vec_dist(my.pos,camera.pos)*300;
		
		cam_pan=camera.pan;
		cam_tilt=camera.tilt;
		vec_set(cam_pos,camera.pos);
		vec_sub(cam_pos,my.pos);
		wait(1);
	}
}




My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: massive shader collection... [Re: Blink] #339151
08/24/10 21:40
08/24/10 21:40
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
you know...i can guess why people dont respond. i guess i am the only A6 user active here on a regular basis. i am here everyday. well, if someone can help, great, if not...i will figure something out,lol.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: massive shader collection... [Re: Blink] #339159
08/24/10 22:48
08/24/10 22:48
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
why don't you use the default water shader? it's very easy to adapt it to c-script

Last edited by painkiller; 08/24/10 22:49.

3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: massive shader collection... [Re: painkiller] #339160
08/24/10 22:50
08/24/10 22:50
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
If you want tell me what of the default water shaders do you want to use and i'll try to adapt it to c-script wink


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: massive shader collection... [Re: painkiller] #339169
08/25/10 01:58
08/25/10 01:58
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i just ned the refract to work. when i dive into my pool, its clear, but i want the water to refract to simulate being underwater/caustics. can you advise me on how to use the script i posted? i keep getting an error and the effect wont load. I am using A6 pro btw.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: massive shader collection... [Re: Blink] #339172
08/25/10 03:50
08/25/10 03:50
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Why don't you use mytic moods for A6 pro it has a very good water script that uses caustics as well as waves etc.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: massive shader collection... [Re: Nidhogg] #339173
08/25/10 03:55
08/25/10 03:55
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
well, this is a pool. i just wanted that "wavy" effect in the water like the example in the massive shader collection. have you seen that example? the one by moscogames.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: massive shader collection... [Re: Blink] #339219
08/25/10 11:33
08/25/10 11:33
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
You can do the same with mystymoods water shader, Just resize the mesh to whatever size you need.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: massive shader collection... [Re: Nidhogg] #339230
08/25/10 13:01
08/25/10 13:01
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
do you have that watershader code, and the mesh? i had it, but i mustve lost it when i crashed my drive.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1