tele portal

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
j3st3r
Posts: 97
Joined: Fri Oct 01, 2010 11:02 pm

tele portal

Post by j3st3r »

Can the tele portal be applied to a custom texture or is hard coded to work only with portal_sfx texture?
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: tele portal

Post by Noruen »

of course not. You can create your own, just add into your shader "portal" global command.
j3st3r
Posts: 97
Joined: Fri Oct 01, 2010 11:02 pm

Re: tele portal

Post by j3st3r »

Mind explaining a little bit more plz? Sorry to ask, still pretty new to shader stuff.
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: tele portal

Post by Noruen »

Of course. But first of all see Radiant manual (F1) and Shader manual (Help>Q3A/Q3TA>Shader manual) for understanding all commands. This is shader code of portal used in Q3A.

You can modify it only by replacing original paths to paths to your textures. But as I said - see shader manual to understand what is blendFunc, deformVertexes etc.

Code: Select all

textures/sfx/portal_sfx
{
	portal                                                     << THIS IS THAT IMPORTANT COMMAND
	surfaceparm nolightmap
	deformVertexes wave 100 sin 0 2 0 .5
	{
		map textures/sfx/portal_sfx3.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		depthWrite
	}
	{
		map textures/sfx/portal_sfx1.tga
		blendfunc gl_dst_color gl_zero
		tcMod rotate 360
	}
	{
		map textures/sfx/portal_sfx.tga
		blendfunc gl_one gl_one
		rgbgen wave inversesawtooth 0 .5 .2 .5
	}
	{
		map textures/sfx/portalfog.tga
		blendfunc gl_src_alpha gl_one_minus_src_alpha
		alphagen portal 256
		rgbGen identityLighting
		tcmod rotate .1 //.1
		tcmod scroll .01 .03
	}
}
Post Reply