

//Author: Melan based on the Canon Texture Pack project (photosource)
textures/darkmod/carpet/rugs/ornate_floral_checker01
{
    surftype15
    description "carpet"

    qer_editorimage textures/darkmod/carpet/rugs/ornate_floral_redandgold_ed
    diffusemap      textures/darkmod/carpet/rugs/ornate_floral_redandgold
    bumpmap         textures/darkmod/carpet/rugs/ornate_floral_redandgold_local

    {
        if ( parm11 > 0 )
        blend       gl_dst_color, gl_one
        map         _white
        rgb         0.40 * parm11
    }
    {
        if ( parm11 > 0 )
        blend       add
        map         textures/darkmod/carpet/rugs/ornate_floral_redandgold
        rgb         0.15 * parm11
    }

	// TDM Ambient Method Related 
	{							
		if (global5 == 1)		
		blend add				
		map				textures/darkmod/carpet/rugs/ornate_floral_redandgold		
		scale			1, 1		
		red				global2	
		green			global3	
		blue			global4	
	}							
	{							
		if (global5 == 2)		
		blend add				
		program	ambientEnvironment.vfp	
		vertexParm		0		1, 1, 1, 1		// UV Scales for Diffuse and Bump	
		vertexParm		1		1, 1, 1, 1	// (X,Y) UV Scale for specular		
		vertexParm		2		global2, global3, global4, 1	
																
		fragmentMap		0		cubeMap env/gen1				
		fragmentMap		1		textures/darkmod/carpet/rugs/ornate_floral_redandgold_local			// Bump				
		fragmentMap		2		textures/darkmod/carpet/rugs/ornate_floral_redandgold			// Diffuse			
		fragmentMap		3		_black			// Specular			
	}
}