// ***************
// **** VINES ****
// ***************

textures/aedm7/pom_vine06
{

	qer_editorimage textures/aedm7/pom_vine06.tga
	qer_trans 0.99
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	cull none
	{
		map textures/aedm7/pom_vine06.tga
		blendFunc GL_ONE GL_ZERO
		alphaFunc GE128
		depthWrite
		rgbGen identity
	}
	{
		map $lightmap
		rgbGen identity
		blendFunc GL_DST_COLOR GL_ZERO
		depthFunc equal
	}
}

textures/aedm7/pom_vine06_pom		// Dangling from ceiling edges
{
	// Must be used on simple patch meshes to work (2-sides, shadows)
	qer_editorimage textures/aedm7/pom_vine06.tga
	qer_trans 0.99
    // Does not work for nodraw brushes, use patches!
	q3map_backShader textures/aedm7/pom_vine06_back
	q3map_vertexScale 2
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
//	cull none					// Need to see both sides!
	{
		map textures/aedm7/pom_vine06.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_vine06_back
{
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_vine06.tga
		rgbGen const ( 0.2 0.2 0.2 )
		alphaFunc GE128
	}
}


// ****************
// **** PLANTS ****
// ****************

textures/aedm7/pom_leave01d		// fern (dead)
{
	qer_editorimage textures/aedm7/pom_leave01d.tga
//	q3map_backShader textures/aedm7/pom_leave01d_back
	q3map_vertexScale 1.5
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave01d.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_leave01d_back
{
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave01d.tga
		rgbGen const ( 0.2 0.2 0.2 )
		alphaFunc GE128
	}
}

// ----------------------------------------------------------------------

textures/aedm7/pom_leave01b		// fern 2
{
	qer_editorimage textures/aedm7/pom_leave01b.tga
//	q3map_backShader textures/aedm7/pom_leave01b_back
	q3map_vertexScale 1.5
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave01b.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_leave01b_back
{
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave01b.tga
		rgbGen const ( 0.2 0.2 0.2 )
		alphaFunc GE128
	}
}

// ======================================================================
// Smokey Grass
// ======================================================================
// cull disable *** possibly add later!
textures/aedm7/pom_grass01
{
	qer_editorimage textures/aedm7/pom_grass01.tga
//	** Remove the following line if creating the ASE **
	q3map_backShader textures/aedm7/pom_grass01_back
	q3map_vertexScale 2
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	qer_trans 0.99
	{
		map textures/aedm7/pom_grass01.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_grass01_back
{
	qer_editorimage textures/aedm7/pom_grass01.tga
	q3map_vertexScale 2
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_grass01.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_grass01d
{
	qer_editorimage textures/aedm7/pom_grass01d.tga
	q3map_backShader textures/aedm7/pom_grass01d_back
	q3map_vertexScale 2
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	qer_trans 0.99

	{
		map textures/aedm7/pom_grass01d.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_grass01d_back
{
	qer_editorimage textures/aedm7/pom_grass01d.tga
	q3map_vertexScale 2
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_grass01d.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

// ----------------------------------------------------------------------

textures/aedm7/pom_leave02d		// Curvy pointy leave
{
	qer_editorimage textures/aedm7/pom_leave02d.tga
	q3map_backShader textures/aedm7/pom_leave02d_back
	q3map_vertexScale 1.5
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave02d.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_leave02d_back
{
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave02d.tga
		rgbGen const ( 0.2 0.2 0.2 )
		alphaFunc GE128
	}
}

textures/aedm7/pom_leave03a		// Two tone green
{
	qer_editorimage textures/aedm7/pom_leave03a.tga
	q3map_backShader textures/aedm7/pom_leave03a_back
	q3map_vertexScale 1.5
	qer_alphafunc greater 0.5
	surfaceparm alphashadow
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave03a.tga
		rgbGen vertex
		depthWrite
		alphaFunc GE128
	}
}

textures/aedm7/pom_leave03a_back
{
	surfaceparm trans
	surfaceparm nonsolid
	surfaceparm nomarks
	{
		map textures/aedm7/pom_leave03a.tga
		rgbGen const ( 0.2 0.2 0.2 )
		alphaFunc GE128
	}
}


// ***************
// **** STEAM ****
// *************** from Burial Grounds Map Pak 1 (fixed using movesquare code)

textures/aedm7/bgmp1_steam01
{
	qer_editorimage textures/aedm7/bgmp1_steam_add.tga
	qer_trans 0.3
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm nodlight
	surfaceparm trans
	cull none
	deformVertexes autosprite2
	deformVertexes wave 50 sin 0 4 0 0.3
	deformVertexes move 0.3 0.1 0 sin 0 0.5 0 0.2
	{
		map textures/aedm7/bgmp1_steam_add.tga
		tcMod scroll 0 0.3
//		rgbGen Vertex				// Hides texture!
		blendfunc add
	}
}


// *********************
// **** POM TERRAIN ****
// ********************* These are phong shaded to smooth out details!
// The secondary blend texture pom_ter_rock2vine.tga requires alpha channel,
// other texture can be turned JPG.

textures/aedm7/pom_ter_dirt1	// Used around ruins
{
	qer_editorimage textures/aedm7/pom_ter_dirt1.tga
	q3map_nonplanar
	q3map_shadeangle 120
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/aedm7/pom_ter_dirt1.tga
		blendFunc filter
	}
}

textures/aedm7/pom_ter_rock2	// Vertical needs phong
{
	qer_editorimage textures/aedm7/pom_ter_rock2.tga
	q3map_nonplanar
	q3map_shadeangle 120
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/aedm7/pom_ter_rock2.tga
		blendFunc filter
	}
}

textures/aedm7/pom_ter_rock2vine	// Vertical needs phong
{
	qer_editorimage textures/aedm7/pom_ter_rock2vine.tga
	q3map_nonplanar
	q3map_shadeangle 120
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/aedm7/pom_ter_rock2vine.tga
		alphaFunc GT0
		blendFunc filter
	}
}

textures/aedm7/pom_ter_rock2moss1	// Vertical needs phong
{
	qer_editorimage textures/aedm7/pom_ter_rock2moss1.tga
	q3map_nonplanar
	q3map_shadeangle 120
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/aedm7/pom_ter_rock2moss1.tga
		alphaFunc GT0
		blendFunc filter
	}
}

textures/aedm7/pom_ter_rock2blend		// Vine walls only
{
	// Terrain blending without dotProduct2 and ivector
	// AEon: alpha_ brushes used on edge vertices to rock (not vine),
	//		0% normally, also 25% and 50% (rare)
	qer_editorimage textures/aedm7/pom_ter_rock2blend.tga
	q3map_nonplanar
	q3map_shadeAngle 120
	{
		map textures/aedm7/pom_ter_rock2.tga		// Primary
		rgbGen identity
	}
	{
		map textures/aedm7/pom_ter_rock2vine.tga	// Secondary (required alpha channel)
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		alphaFunc GE128
		rgbGen identity
		alphaGen vertex
	}
	{
		map $lightmap
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
}

