Page 1 of 1

tele portal

Posted: Wed Aug 03, 2011 6:11 pm
by j3st3r
Can the tele portal be applied to a custom texture or is hard coded to work only with portal_sfx texture?

Re: tele portal

Posted: Wed Aug 03, 2011 8:26 pm
by Noruen
of course not. You can create your own, just add into your shader "portal" global command.

Re: tele portal

Posted: Thu Aug 04, 2011 2:02 am
by j3st3r
Mind explaining a little bit more plz? Sorry to ask, still pretty new to shader stuff.

Re: tele portal

Posted: Thu Aug 04, 2011 8:14 am
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
	}
}