Reflecting water-shader kind of problem :<


(Skumtomten) #1

I did search for this on the forums search thingie, though I couldn’t get it to work.

Right-- not that I have much experience of naabing with those shaders, so this were probably a quite difficult thing to start with uhm… anyway…
I’ve tried whole morning with different things of how to do.
:bump:
With all the things I’ve tried the water remains solid and won’t reflect anything.
I have added water “the way it’s meant to be added”… you know with nonsolid and all that things… :F and I have a misc_portal_surface above it (about 16 / 32 untis above I think.) hmmm… would really appreciate if someone would like to help me with this thing and say what I’m doing wrong. :slight_smile:

Oh, right… this is the shader at this moment… I can’t really expect much of it to be correct… :F hmmh…

textures/srefwat/srefwat_water
{
	qer_editorimage textures/srefwat/srefwat_water.tga
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm playerclip
	surfaceparm water
	portal
	{
		map textures/srefwat/srefwat_water.tga
		depthWrite
		alphaGen portal 1024
	}
}


(kamikazee) #2
surfaceparm playerclip

This will at least stop the player from falling into the water.


(IneQuation) #3

Playerclip prevents players from entering the water. You should remove it from the shader.
Does the portal surface work?


(Skumtomten) #4

Well-- the water works now, thanks alot. :slight_smile:
However it doesn’t work whenI align the “nodraw-nosolid” texture to the waterbrush except for the top face… but when the whole brush is using the water texture it is water. :\


(Skumtomten) #5

Right… sorry for doublepost but uhm… I now have the watertexture there, and it reflects the environment… however I can’t walk in it… it’s solid once again. :S
Also I would like to have it atleast a little little bit transparent if possible… could anyone tell me how to do this? :F I tried with “AlphaGen” but that didn’t seem to add any transparency. :X

textures/srefwat/portal
{
	qer_editorimage textures/srefwat/portal.tga
	qer_tran 0.95
	sort 9
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm water
	surfaceparm trans
	sort portal
	{
		map textures/srefwat/water.tga
 		blendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
		depthWrite
		alphaGen 0.8
		alphaGen portal 1024
        }
}

(Lanz) #6

Mke sure that you use something like common/nodrawwater on the sides of the brush using your water shader. The brush needs the same surfaceparms on all sides of the brush or you get into trouble. When the compiler pick a brush it picks one random face of the brush and use the surfaceparm it finds on that face for the entire brush.


(Skumtomten) #7

Hmm… well I only have a common/nodraw and a common/nodraw-nonsolid texture, doesn’t work with either of them, also I’ve tried to do whole the brush with only the one texture, though that doesn’t work either. :F