water shader

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
^Ghost
Posts: 230
Joined: Tue Sep 08, 2009 3:35 am

water shader

Post by ^Ghost »

im having some trouble with making my water shader transparent im basically using the clear_calm1 shader with some minor tweaks.. this is the shader im using

Code: Select all

textures/ghost-pornstar2/dirty_water
{
	qer_editorimage textures/liquids/pool3d_5e.tga
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm water
	cull disable
	deformVertexes wave 64 sin 0.25 0.25 0 0.5 
	qer_trans 0.5
	qer_nocarve
	{
		map textures/liquids/proto_gruel3.tga
		tcMod scroll 0.035 0.035
	}
	{
		map textures/liquids/pool3d_5e.tga
		blendfunc gl_dst_color gl_src_color
		rgbGen identity
		tcMod scroll 0.025 0.01
	}
}
and heres what it looks like in game..
[lvlshot]http://img62.imageshack.us/img62/3281/shot0064e.jpg[/lvlshot]
[url=https://github.com/Garux/netradiant-custom]NRC[/url]
[url=https://defrag.racing/]Defrag[/url]
[url=http://ws.q3df.org/]Q3 Map Archive[/url]
$NulL
Posts: 100
Joined: Wed Mar 27, 2002 8:00 am

Re: water shader

Post by $NulL »

You need a blend mode in the first stage, something like:

{
blendfunc add
map textures/liquids/proto_gruel3.tga
tcMod scroll 0.035 0.035
}

Right now your only blending the second stage on top of an opaque first stage; instead of blending the first stage with the back ground, then blending in the 2nd.
skinNCNmaster
Posts: 344
Joined: Wed Jan 29, 2003 8:00 am

Re: water shader

Post by skinNCNmaster »

those beams would look more realistic if they began from the floor and fade as they rose up..

generally beams are visible due to fog or smoke in an area, and as they are nearly opaque at one end, reversing them so they touch ground on the opaque end, will cause the light to appear as if from the sun..

now it looks as if the hole is projecting the beams..

Image

or you might try an other method altogether as the light tends not to be sharp edged in cases such as these..

Image
the above pic turns the beam into a * shape, and adds a circular version on the ground
Post Reply