Liquid texture and shader problem


(Danyboy) #1

I feel like such a noob - but anyways :frowning: -

Below are two shaders they are pretty much spliced from siwa_water and the battery ocean terrain. - Now then here are the code sections:

My sea texture

textures/omaha_ov/sea
{
	nocompress
	qer_editorimage textures/liquids_sd/sea.tga
	qer_trans .5
	q3map_globaltexture
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm water
	surfaceparm nomarks
	cull disable
	nopicmip
	nofog

	deformVertexes wave 1317 sin 0 2.5 0 0.15
 	deformVertexes wave 317 sin 0 1.5 0 0.30

	waterfogvars ( 0.11 0.13 0.15 ) 0.2
	
	{
		map textures/liquids_sd/seawall_specular.tga
		blendFunc GL_ONE GL_ONE
		rgbGen vertex
		tcGen environment
		depthWrite
	}
	
	{ 
		map textures/liquids_sd/sea_bright_na.tga
		blendFunc blend
		rgbGen identity
		alphaGen const 0.8
		tcmod scroll 0.005 0.03
	}
	
}

SD’s Siwa_water texture

textures/liquids_sd/siwa_water
{
	nocompress
	qer_editorimage textures/liquids_sd/siwa_water.tga
	qer_trans .5
	q3map_globaltexture
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm water
	surfaceparm nomarks
	cull disable
	nopicmip
	nofog

	waterfogvars ( 0.11 0.13 0.15 ) 0.2
		{ 
		fog on
		map textures/liquids_sd/siwa_water.tga
		blendFunc blend
		alphaFunc GE128
		depthWrite
		rgbgen identity
		tcmod scale 0.5 0.5
		tcmod scroll -.02 .001
	}
	
	{ 
		fog on
		map textures/liquids_sd/seawall_ripple1.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.3 0.02 0 0.25 
		tcmod scale 0.01 0.01
		tcmod scroll -.001 -.0002
	}
	
	{ 
		fog on
		map textures/liquids_sd/seawall_ripple1.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.1 0.03 0 0.4
		tcmod scale 1 1
		tcmod scroll -.005 -.001
	}
	{ 
		fog on
		map textures/liquids_sd/siwa_shimshim1.tga
		blendFunc GL_ONE GL_ONE
		rgbGen wave sin 0.4 0.02 0 0.3
		tcmod transform 0 1.5 1 1.5 2 1
		tcmod scroll .005 -.001
	}
}

Ok so you can see the only difference in my shader is that ive removed 2 textures from the shader - replaced the other two with diff tga files - also add 2 deformvertexes for the rise of ocean

In ET the textures are fine, the brush deforms also - however - it is not a liquid - its as if the nonsolid line is being ignored.

thnks - db


(Shallow) #2

Make sure the shaders on the other sides of the brush have surfaceparms for nonsolid and water, and matching fog. The content of the brush is determined by the first face the compile finds, that’s why SD has specific nodraw shaders to match their water types.


(Danyboy) #3

i have 1 water brush and it is made of just that 1 texture so thats not problem :frowning:


(Danyboy) #4

ok if nobody knows why my shader isn’t liquid in game

Ive also noticed in Radiant - siwa_water is transparnt in 3D window - and has white outline - thus shader works - but my texture is solid - and has no white outline

any tips welcome
:bored:


(Womprat) #5

Did you add your shader to shaderlist.txt?


(Danyboy) #6

erm nope- i can see how that might affect the texture from in Radiant - but I can’t see how adding the shader to the shaderlist would affect the texture properties in ET

will try now though.


(Danyboy) #7

doh - dont i feel like an idiot - it works now.

Hmm i dont know why it works now - it just does
:clap:

and myabe a banana too:
:banana: