Shader Problem


(Softwar) #1

Hi all,

I’ve got a problem with a shader in my .shader file. My terrain works => I can see it, but I can’t lay mines. Here is my shaderfile =>


textures/Antarctica/terrain_0
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
        
	{
		map textures/snow_sd/snow_noisy.tga
		rgbGen vertex
		tcmod scale 0.423 0.423
	}
}

textures/Antarctica/terrain_1
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
        
	{
		map textures/snow_sd/snow_var01_big.tga
		rgbGen vertex
		tcmod scale 0.423 0.423
	}
}

textures/Antarctica/terrain_2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
        
	{
		map textures/snow_sd/mxrock4b_snow.tga
		rgbGen vertex
		tcmod scale 0.423 0.423
	}
}

textures/Antarctica/terrain_0to1
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow_sd/snow_noisy.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
	}
	{
		map textures/snow_sd/snow_var01_big.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/Antarctica/terrain_0to2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow_sd/snow_noisy.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
	}
	{
		map textures/snow_sd/mxrock4b_snow.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/Antarctica/terrain_1to2
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow_sd/snow_var01_big.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
	}
	{
		map textures/snow_sd/mxrock4b_snow.tga
		rgbGen vertex
		alphaGen vertex
		tcmod scale 0.423 0.423
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
	}
}

textures/Antarctica/terrain.vertex
{
	surfaceparm nolightmap
	q3map_novertexshadows
	q3map_forcesunlight
	{
		map textures/snow_sd/snow_noisy.tga
		rgbGen vertex
		tcmod scale 0.423 0.423
	}
}

How can I lay mines in my map? And I’ve got a problem with a texture named ‘alpha_ice2s’. I used nodrawn but the texture doesn’t work properly.
I added this to my .shader file, but it still doesn’t work =>



textures/snow/alpha_ice2s.tga
{
	qer_trans 0.85
	qer_editorimage textures/snow/alpha_ice2s.tga
	cull disable
	nomipmaps
	nopicmip
	surfaceparm nomarks
	surfaceparm alphashadow
	surfaceparm nonsolid
	surfaceparm pointlight
	surfaceparm trans
	implicitMask textures/snow/alpha_ice2s.tga
}

What do I have to do?!

Please help me!

:banghead: Softwar :banghead:


(thegnat) #2
surfaceparm landmine

Add the above to your textures where you want to allow landmines.

Whats your problem with the alpha_ice2 texture? It works perfect on my machine. Its just with grey background in the editor - in game it will show up properly.


(Softwar) #3

Ok, I’ll add surfaceparm code.

But the ice texture…in the editor I’ve got the grey background…BUT ingame I’ve got also a grey background. I’m using Nodrawn at all sides of my brush…

:banghead: Softwar :banghead:


(.Chris.) #4

sorry but it seems to do that with both versions of the ice, one with black background and grey background :disgust: unless theres a third ice hiding somewhere? anyone else got it working i too could do with it in my own map :smiley:


(Grand_Mister_P) #5

Do you need one of these .shader files if you use any shader? Even the ones supplied and already in use in ET/radiant?


(thegnat) #6

Softwar, why do you have modified the shader of the alpha_ice2 texture?
If you modify it without changing the name, you’ll seriously screw all other maps that use the same texture reference.
IF you modify something then also change the name (eg. textures/softwar/alpha_ice2) the paths to the textures can be the same as in the original shader.

Here is the original shader from snow.shader *Added the editorimage to the shader, so it displays correctly in Radiant.:

textures/snow/alpha_ice2
{		
	qer_editorimage textures/snow/alpha_ice2s.tga
	surfaceparm alphashadow
	cull none

	{
		map textures/snow/alpha_ice2s.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		rgbGen vertex
	}
}