deform vertexes water shader problem


(damocles) #1

Why isn’t the shader below dividing up the surface so that the small divisions can then all deform seperately? It seems to be stuck in some kind of default 1024 size tessellation.

textures/mp_subpen/turbulent_water
{
	qer_editorimage textures/liquids_sd/seawall_foam.tga
	qer_trans 0.5
	q3map_tcGen ivector ( 256 0 0 ) ( 0 256 0 )
	q3map_globalTexture
	surfaceparm nonsolid
	surfaceparm trans
	surfaceparm nomarks
	surfaceparm lightfilter
	surfaceparm pointlight
	cull disable
	nopicmip
	tessSize 8
	deformVertexes wave 8 sin 0 8 0 0.35
	deformVertexes wave 8 sin 0 4 0 0.45	
	{ 
		map textures/liquids_sd/sea_bright_na.tga
		blendFunc blend
		rgbGen identity
		//alphaGen const 0.8
		tcMod scale 0.063 0.063
		tcmod scroll 0.005 0.03
	}
}

(heeen) #2

8 seems to be a very small tesssize… imagine how many triangles are created, when a 256x256 surface is split…
maybe it’s too small for the engine, try 64 or something.
tried moving the tesssize up in the file, like first or second command?


(heeen) #3

works perfectly for me:

textures/heeen/blah
{

	tessSize 256
    deformVertexes wave 256 sin 0 64 0 0.002
    deformVertexes move 2 2 0   sin 0 9 0 0.005
    deformVertexes move 0 0 1   sin 0 9 0 0.001

	cull disable
	nomipmaps
	nopicmip
	surfaceparm alphashadow
	surfaceparm pointlight
	surfaceparm noimpact
	surfaceparm nonsolid
	surfaceparm trans
	implicitMask -
}

(Danyboy) #4

check to recompile map and that u havent got another version in pk3 file which is being used in place of 1 that is in your scripts folder


(damocles) #5

It was the ordering thing (go figure). I put tessSize and deformVertexes at the top and it worked first time. I wasn’t aware that ordering had any effect, but you live and learn. Danke.


(heeen) #6

Kein Problem!
(lol, i’m from germany and “danke” is a funny thing to read in a english text… at least i’m not used to it :smiley: )


(damocles) #7

I’m a weird person :slight_smile: I say danke when I’m speaking to people in person. I think I just played RTCW too much :slight_smile: