#*****************************************************************************
# Copyright (C) 1986-2005 mental images GmbH, Fasanenstr. 81, D-10623 Berlin,
# Germany. All rights reserved.
# Portions Copyright (C) 1997-2005 Alias Systems Corp.
# ******************************************************************************
#
# Copyright (C) Alias Systems, a division of Silicon Graphics Limited and/or
# its licensors ("Alias").  All rights reserved.  These coded instructions,
# statements, computer programs, and/or related material (collectively, the
# "Material") contain unpublished information proprietary to Alias, which is
# protected by Canadian and US federal copyright law and by international
# treaties.  This Material may not be disclosed to third parties, or be
# copied or duplicated, in whole or in part, without the prior written
# consent of Alias.  ALIAS HEREBY DISCLAIMS ALL WARRANTIES RELATING TO THE
# MATERIAL, INCLUDING, WITHOUT LIMITATION, ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND/OR FITNESS FOR A
# PARTICULAR PURPOSE.  IN NO EVENT SHALL ALIAS BE LIABLE FOR ANY DAMAGES
# WHATSOEVER, WHETHER DIRECT, INDIRECT, SPECIAL, OR PUNITIVE, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, OR IN EQUITY,
# ARISING OUT OF OR RELATED TO THE ACCESS TO, USE OF, OR RELIANCE UPON THE
# MATERIAL.
# ******************************************************************************
#
#					maya light linking
#	mayaLightlink_mib_illum_lambert
#	mayaLightlink_mib_illum_lambert2
#					emit diffuse, emit specular
#	mayaEmitLight_mib_light_point
#	mayaEmitLight_mib_illum_phong
# ******************************************************************************

min version "2.0.20"
max version "3.4.99"

#
#	mib_illum_lambert
#	with lightLink
#
declare shader
	color "mayaLightlink_mib_illum_lambert" (
		color		"ambience",  #: default .2, .2, .2, 1.
		color		"ambient",   #: default .5, .5, .5, 1.
		color 		"diffuse",   #: default .7, .7, .7, 1.
		integer		"mode",      # light selection mode 0..2
					             #: softmin 0 softmax 2 default 0
		array light	"lights",
		shader		"lightLink",
		boolean		"miLightLink"	#: default 0
	)
	version 2
	apply material
end declare


#
#	mib_light_point modification that sets 
#	emit diffuse, emit specular
#
declare shader
	color "mayaEmitLight_mib_light_point" (
		color		"color",    #: default 1., 1., 1., 1.
		boolean		"shadow",   #: default 1
		scalar		"factor",   #: softmin 0 softmax 1    default 0.
		boolean		"atten",    #: default 1
		scalar		"start",    #: softmin 0 softmax 100  default 1
		scalar		"stop",     #: softmin 0 softmax 1000 default 100
		boolean		"emitDiffuse",	#: default 1
		boolean		"emitSpecular"	#: default 1
	)
	version 1
	apply light
end declare

#
#	mib_illum_phong modification that reads
#	emit diffuse, emit specular
#
declare shader
	color "mayaEmitLight_mib_illum_phong" (
		color		"ambience",  #: default .2, .2, .2, 1.
		color		"ambient",   #: default .5, .5, .5, 1.
		color 		"diffuse",   #: default .7, .7, .7, 1.
		color 		"specular",  #: default .5, .5, .5, 1.
		scalar		"exponent",  # phong exponent
					             #: softmin 0 softmax 100 default 50
		integer		"mode",      # light selection mode 0..2
					             #: softmin 0 softmax 2 default 0
		array light	"lights"
	)
	version 2
	apply material
end declare
