
/****************************************************************************************

		I3DExShader.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		I3DExShader definition

		Author:	Ray Dream
		Date:	3/2/98

		Revision History

		when		who					what & why
		==========	================	======================================================
		12/25/2000	Charles				Removed #include "TMCArray.h"
		08/26/99	cph					Added family ids
		08/11/99	Guillaume&Christy	Added inheritance to all the Basic* classes
		02/17/99	EricB				Added Contains
		01/06/99	EricB				Added ConvertToPoly and OutlineInPreviewMode

*****************************************************************************************/
#ifndef __I3DEXSHADER__
#define __I3DEXSHADER__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "IExtension.h"
#include "APITypes.h"
#include "ShaderTypes.h"
#include "InterfaceIDs.h"

//****** Globally Unique Ids *************************************************
MCDEFINE_GUID2(IID_I3DExShader, R_IID_I3DExShader);

//****** Family Id *************************************************

struct IShTextureMap;
struct LightingDetail;
struct LightingContext;
struct I3DShShader;
struct I3DShLightingModel;
struct IPreviewMaker;
struct I3DShMasterShader;
struct IShTextureMapBucketCache;
class TAbsorptionFunction;

template<class T> class TMCArray;

/*****************************************************************************\
*  I3DExShader                                                                *
*                                                                             *
*  Shaders                                                                    *
*                                                                             *
\*****************************************************************************/

#ifndef qDemoVersion //regular interface

/// \addtogroup ExternalInterface
/// \{


/// <P>Shaders are used to give photorealistic appearance to an object’s surface. They
/// define a value for each point in the UV space of an object.  They are used by the
/// renderer to calculate the appearance of an object in the rendered image.
/// A shader is comprised of a group of channels (color, transparency, reflections, etc.)
/// which are combined to form a complete shader.</P>
///
/// <P>Shaders are designed to be re-entrant such that the output from one shader can be used
/// as the input for another shader.  This is accomplished by implementing methods to return
/// a value, color, or complete shading structure and then using GetShadingFlags() and
/// GetImplementedOutput() to define which implementation was used.  Methods that return 
/// simply a value, color, or vector use the "ShadingIn" struct, filling in the fields as defined
/// by GetShadingFlags() independent of the channel in which the shader is placed.  A shader
/// that implements an entire shading structure uses a "ShadingOut" structure that sets values
/// for a ShadingIn structure for each channel of the shader.</P>
///
/// <P><B>Lighting Model:</B> shaders can override the default lighting model to provide a more
/// accurate definition of the surface properties. This allows to simulate effects such as
/// anisotropic material or glass with fresnel effect. You could also use a shader to implement
/// a global illumination effect that only applies to certain objects.</P>
///
/// <P>Note: When implementing a shader with sub-shaders in their PMap, the shaders ID must have a 
///	specific name to be properly copied when the shader parent is replaced by another shader 
///	accepting sub-shaders.( replacement is done in TComponentTreePart::RetrieveComponent )
///	Complex shaders ( Operators, Mixers, Curve Editor, Color Gradient ) use the following
///	norm: 'Sh00', 'Sh01', 'Sh02', ... for naming their shaders in the PMap.</P>
///
struct I3DExShader: public IMCUnknown
{
	/// Compares the values of two shaders. IsEqualTo() must first get a pointer on
	/// the same interface as itself before comparing the values.
	///
	/// \param aShader The shader that should be compared to this.
	///
	virtual boolean		MCCOMAPI IsEqualTo(I3DExShader* aShader) = 0;

	/// specifies which parameters the shader will need to perform shading calculations.
	/// If the shader is a constant shader which values does not depend on any of the ShadingIn
	/// parameters then it should set the fCallOnce flag in theFlags to true.
	/// See the description of the ShadingFlags structure for more details.
	///
	/// \param theFlags The flags that are returned
	///
	virtual MCCOMErr	MCCOMAPI GetShadingFlags(ShadingFlags& theFlags) = 0;

	/// Returns true if the shader needs a transform tab. This is only useful if your
	/// shader relies on 3D coodinates and not UV coordinates.
	///
	virtual boolean		MCCOMAPI WantsTransform() = 0;

	/// Determines which methods the Shader actually implements. Return only one of the following values
	/// if you implement only one of the methods.  If more than one is implemented
	/// then return the result as the OR of the two values
	/// \code
	/// return kUsesGetValue | kUsesGetColor;
	/// \endcode
	/// For a complete description of the constant that can be used, please refer to EShaderOutput
	///
	virtual EShaderOutput	MCCOMAPI GetImplementedOutput() = 0;

	// ****************************************************************************
	//						HasExplicitLightingModel		
	// 
	/// Returns true if there is an explicit lighting model in the subtree. This is
	/// mostly used for layer lists to determine if DoShade or ShadeAndLight2 should
	/// be called on the layer.
	///
	/// \param lightingContext The information about the current point being shaded (including incoming ray...)
	///
	virtual boolean MCCOMAPI HasExplicitLightingModel(const LightingContext& lightingContext)=0;

	// ****************************************************************************
	//								ShadeAndLight2
	// 
	/// <P>Calculates the shading and lighting in one point. You should only override
	/// this method if you want to implement advanced lighting effects in your shader.
	/// Note that you can override part of the lighting model by overriding CalculateDirectLighting()
	/// or CalculateReflection()...
	/// 
	/// \param result                  The lighting that is returned.
	/// \param lightingContext         Info about the point being shaded and the lighting of the scene.
	/// \param inDefaultLightingModel  A pointer to the default lighting model.
	/// 
	/// \return MC_S_OK if you implemented this method, MC_E_NOTIMPL if not.
	///
	virtual MCCOMErr MCCOMAPI ShadeAndLight2(LightingDetail&			result,
											 const LightingContext&		lightingContext,
											 I3DShLightingModel*		inDefaultLightingModel,
											 TAbsorptionFunction*		absorptionFunction)=0;

	// ****************************************************************************
	//							DoShade
	//
	/// Returns the shading at a given point as described in the shadingIn.
	/// Note that you also need to fill the fCurrentCompletionMask of shadingIn with the
	/// channels that your shader is actually filling (this allows to have shaders that 
	/// only after certain channel without modifying the others in a layered shader).
	///
	/// <P>Note that the alpha is not premultiplied in the shading.</P>
	///
	/// \note A shader should implement at least one other following methods:
	/// DoShader , GetValue or GetColor
	///
	/// \param result:		the shading data as calculated by the shader
	/// \param shadingIn:	the location where the shading should be calculated
	///
	/// \return MC_S_OK if the shader implements this method, MC_E_NOTIMPL otherwise
	///
	virtual MCCOMErr	MCCOMAPI DoShade(ShadingOut& result,ShadingIn& shadingIn) = 0;

	// ****************************************************************************
	//								GetValue
	// 
	/// Calculates the value of the shader at a given point described in shadingIn.
	///
	/// \note A shader should implement at least one other following methods:
	/// DoShader , GetValue or GetColor
	///
	/// \param result		The resulting value
	/// \param fullArea		Return false if the shader only did a point sampling, Return false
	///						if the shader average the shading over the area.
	/// \param shadingIn:	the parameters for the shading
	///
	/// \return the opacity (for Layer Lists) of this shader (between 0 and 1) 
	///
	virtual real		MCCOMAPI GetValue(real& result,boolean& fullArea,ShadingIn& shadingIn) = 0;
	
	// ****************************************************************************
	//								GetColor
	// 
	/// Calculates the color of a shader for given point described in shadingIn.
	///
	/// <P>Note that the alpha is not premultiplied in the shading ! (But it is in the lighting calculation)</P>
	///
	/// \param result:		The color of the point
	/// \param fullArea		Return false if the shader only did a point sampling, Return false
	///						if the shader average the shading over the area.
	/// \param shadingIn:	the parameters for the shading
	///
	/// \return The opacity (for Layer Lists) of this shader (between 0 and 1) 
	///
	virtual real		MCCOMAPI GetColor(TMCColorRGBA& result,boolean& fullArea,ShadingIn& shadingIn) = 0;
	

	// ****************************************************************************
	//								GetReflection
	// 
	/// Returns the parameters used to calculate the reflection. This function is
	/// only called if the shader is placed in the reflection channel of a multichannel.
	/// 
	/// Do not forget to specify kUseGetReflection in GetImplementedOutput().
	/// 
	/// \param reflectionParams  The parameters used for reflections calculations
	/// \param shadingIn         The info about the point to shade
	/// 
	virtual void		MCCOMAPI GetReflection(TReflectionParameters& reflectionParams,const ShadingIn& shadingIn) = 0;


	// ****************************************************************************
	//								GetTransparency
	// 
	/// Returns the parameters used to calculate the transparency. This function is
	/// only called if the shader is placed in the transparency channel of a multichannel.
	/// 
	/// \param transparencyParams  The parameters used for transparency calculations
	/// \param shadingIn           The info about the point to shade
	/// 
	virtual void		MCCOMAPI GetTransparency(TTransparencyParameters& transparencyParams,const ShadingIn& shadingIn) = 0;
	

	// ****************************************************************************
	//								GetShaderApproximation
	// 
	/// Returns information used to approximate the shading
	/// 
	/// \param result						The approximation of the shading.
	/// \param shadingIn					The info about the point to shade.
	/// 
	virtual void		MCCOMAPI GetShaderApproximation(ShadingOut& result,ShadingIn& shadingIn)=0;

	// ****************************************************************************
	//								GetShaderApproxColor
	// 
	/// Returns information used to approximate the shading
	/// 
	/// \param result						The approximation of the shading.
	/// \param shadingIn					The info about the point to shade.
	/// 
	virtual void		MCCOMAPI GetShaderApproxColor(TMCColorRGBA& result,ShadingIn& shadingIn)=0;
	

	// ****************************************************************************
	//								GetVector
	// 
	/// Returns a perturbation of the normal in local coordinates. This perturbation
	/// is then added to the orginal normal of the point to calculate the bump.
	///
	/// \param result:		the perturbation of the normal
	/// \param shadingIn:	the parameters for the shading
	///
	/// \return The opacity (for Layer Lists) of this shader (between 0 and 1)
	///
	virtual real		MCCOMAPI GetVector(TVector3& result,ShadingIn& shadingIn) = 0;

	// ****************************************************************************
	//								GetVector
	// 
	/// not supported in current version
	///
	virtual MCCOMErr	MCCOMAPI GetBump(TVector3& result,ShadingIn& shadingIn) = 0;

	// ****************************************************************************
	//								ConvertToPoly
	// 
	/// must be implemented to allow a shader to display an outline.  This is typically
	/// used by layers such as ’rectangle’, ’ellipse’, and ’polygon’
	///
	/// \param vertices An array of 2D vertices used to draw a layout around the layer.
	/// Those vertices' coordinates are in the UVSpace of the layer.
	///
	virtual void		MCCOMAPI ConvertToPoly(TMCArray<TVector2>* vertices) = 0;

	// ****************************************************************************
	//								OutlineInPreviewMode
	// 
	/// Return True if the shader will draw an outline.  ConvertToPoly() must then be
	/// implemented. This is typically used by layers such as ’rectangle’, ’ellipse’,
	/// and ’polygon’
	///
	virtual boolean		MCCOMAPI OutlineInPreviewMode() = 0;

	// ****************************************************************************
	//								Contains
	// 
	/// Returns true if a point in uv coordinates is contained in the shape of the
	/// shaders (used for shape shaders only).
	///
	/// \param shadingIn The information about the point being shaded.
	/// \param localUV The uv in the current projection mapping.
	///
	virtual boolean		MCCOMAPI Contains(ShadingIn& shadingIn, TVector2& localUV) = 0;

	// ****************************************************************************
	//								GetOriginalParametricTextureMap
	// 
	/// Returns the original texture map when no special projections mappings.
	///
	/// \param uvSpaceID The uvSpaceID for which we want the texture
	/// \param channelIndex The index of the channel that we want (color,alpha,...)
	/// \param outMap Returns a pointer to the texture map if there is one.
	///
	virtual MCCOMErr	MCCOMAPI GetOriginalParametricTextureMap(const uint32& uvSpaceID, const uint32& channelIndex, IShTextureMap** outMap) = 0; 

	// ****************************************************************************
	//								GetSubShaderPreview
	// 
	/// Creates a shader that can be used to preview one of the subshader.
	/// 
	/// \param shader				Shader created to be used for the preview.
	/// \param subShader			Shader to put in the sub shader identified by the keyword subShaderKeyword.
	/// \param subShaderKeyword     Keywork of the sub shader (in the PMap).
	/// \return true		if the shader created have to be processed by the parent shader,
	///			false		if not.
	///
	virtual boolean		MCCOMAPI GetSubShaderPreview(IShParameterComponent** shader, IShParameterComponent* subShader, FourCharT subShaderKeyword) = 0;

	// ****************************************************************************
	//								GetShaderPreview
	// 
	/// Creates a shader that can be used to preview this shader.
	/// 
	/// \param shader				Shader created to be used for the preview (this shader must
	///								be a clone).
	///
	virtual void		MCCOMAPI GetShaderPreview(IShParameterComponent** shader) = 0;

	// ****************************************************************************
	//								PreviewSubShaderAsTopShader
	// 
	/// Returns true is the sub shader should be previewed as a top shader (only this one
	/// will be visible in the preview window)
	/// 
	/// \param keyword				Id of the sub shader.
	///
	virtual boolean		MCCOMAPI PreviewSubShaderAsTopShader(IDType keyword) = 0;

	// ****************************************************************************
	//								GetSubShaderViewID
	// 
	/// Get the view id of a sub shader.
	/// 
	/// \param keyword				Id of the sub shader.
	/// \return the view id (ressource id) of the view,
	///			or -1 if no view.
	///
	virtual int16		MCCOMAPI GetSubShaderViewID(IDType keyword) = 0;

	// ****************************************************************************
	//								SetDefaultParameters
	// 
	/// Set the parameters to the default values (especially to create default sub shaders).
	///
	virtual MCCOMErr	MCCOMAPI SetDefaultParameters() = 0;

	// ****************************************************************************
	//								GetSubShaderType
	// 
	/// Get the type of a sub shader.
	/// 
	/// \param keyword				Id of the sub shader.
	/// \return the type of the sub shader.
	///
	virtual EShaderFunctionType MCCOMAPI GetSubShaderType(IDType keyword) = 0;

	// ****************************************************************************
	//								SetupPreviewScene
	// 
	/// Setup the preview maker to render a preview of this shader.
	/// 
	/// \param previewMaker			The preview maker to setup.
	/// \param masterShader			The master shader to be previewed.
	///
	virtual MCCOMErr	MCCOMAPI SetupPreviewScene(IPreviewMaker* previewMaker, I3DShMasterShader* masterShader) = 0;
	
	// ****************************************************************************
	//								CalculateDirectLighting
	// 
	/// Override this method to implement your own direct lighting calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param result           The result direct lighting. The fields fAmbient, fDiffuseLight, fSpecularLight, fLightShadow and fGlow should be filled.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// 
	virtual void MCCOMAPI CalculateDirectLighting(LightingDetail& result,const LightingContext&	lightingContext) = 0;
	
	// ****************************************************************************
	//								CalculateReflection
	// 
	/// Override this method to implement your own reflection calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param reflectionColor  The resulting reflection color.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// \param shading          The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateReflection(TMCColorRGB& reflectionColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	
	// ****************************************************************************
	//								CalculateCaustics
	// 
	/// Override this method to implement your own Caustics calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param causticColor     The resulting caustic color.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// \param shading          The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateCaustics(TMCColorRGB& causticColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	
	// ****************************************************************************
	//								CalculateIndirectLighting
	// 
	/// Override this method to implement your own Global Illumination calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param indirectDiffuseColor		The resulting indirect lighting color.
	/// \param ambientOcclusionFactor	The ambient occlusion factor.
	/// \param lightingContext			Info about the point being shaded and the lighting of the scene.
	/// \param shading					The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateIndirectLighting(TMCColorRGB& indirectDiffuseColor, real& ambientOcclusionFactor, const LightingContext& lightingContext, const ShadingOut& shading) = 0;
	
	// ****************************************************************************
	//								ApplyTransparency
	// 
	/// Override this method to implement your own Transparency calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param resColor         The resulting transparency color to add to the final color.
	/// \param outAlpha         The resulting alpha.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// \param shading          The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateTransparency(TMCColorRGB& resColor,real32& outAlpha,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	
	// ****************************************************************************
	//								ApplyAlpha
	// 
	/// Override this method to implement your own Alpha channel calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param resColor         The resulting color.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// \param shading          The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateAlpha(LightingDetail& result,const LightingContext&	lightingContext,const ShadingOut& shading,TAbsorptionFunction* absorptionFunction) = 0;
	
	// ****************************************************************************
	//								CalculateSubsurfaceScattering
	// 
	/// Override this method to implement your own Subsurface Scattering calculation. Note that
	/// if you have overriden ShadeAndLight2(), this method won't be called.
	/// 
	/// \param subsurfaceColor  The resulting subsurface scattering color to add to the final color.
	/// \param currentColor		The current final color.
	/// \param lightingContext  Info about the point being shaded and the lighting of the scene.
	/// \param shading          The shading at this point.
	/// 
	virtual void MCCOMAPI CalculateSubsurfaceScattering(TMCColorRGB& subsurfaceColor,const TMCColorRGB& currentColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;

	// ****************************************************************************
	//								CanBeTransparent
	// 
	/// Return true if the shader can have some transparency.
	/// 
	/// \param shadingDomainIndex     The shading domain that is considered.
	/// 
	virtual boolean		MCCOMAPI CanBeTransparent(int32 shadingDomainIndex) = 0;

	// ****************************************************************************
	//								IsChannelConstantInUVSpace
	// 
	/// Return true if this channel is constant on that UV Space. If not, an exporter should try to bake a texture map.
	/// 
	/// \param uvSpaceID     The UVSpaceID that is considered.
	/// \param channelIndex  The index of the channel
	/// 
	virtual boolean		MCCOMAPI IsChannelConstantInUVSpace(const uint32& uvSpaceID, const uint32& channelIndex) = 0;

	// ****************************************************************************
	//								GetShadersForChannel
	// 
	/// Returns the shader part of a given uvspace / channel.
	///
	/// \param uvSpaceID The uvSpaceID for which we want the texture
	/// \param channelIndex The index of the channel that we want (color,alpha,...)
	/// \param outShaders Returns the list of the shaders found.
	///
	virtual MCCOMErr	MCCOMAPI GetShadersForChannel(const uint32& uvSpaceID, const uint32& channelIndex, TMCPtrArray<I3DShShader>& outShaders) = 0; 
    // ****************************************************************************
    //                             GetRecommendedTextureSize
    //
    /// Calculate the intrinsic appropriate texture size.
    /// \param[in]  channelIndex The channel for which texture is searched
	// \return true if there is such a size, or false of the texture is procedural 
	virtual boolean  MCCOMAPI GetRecommendedTextureSize(uint32 channelIndex, uint32& width, uint32& height) const = 0;
    
    // ****************************************************************************
    //                             GetRelevantTextureBucketCache
    //
    /// \param[in]  channelIndex The channel for which texture is searched
    /// Get the texture map file associated to the specified shading domain.
    virtual void MCCOMAPI GetRelevantTextureBucketCache(uint32 channelIndex, boolean allowMultiplierModification, IShTextureMapBucketCache** outTextureMapFile) const = 0;
    
    // ****************************************************************************
	//								GetConstantColor
    //
	//  Get the constant color of the shader
    //
    // \return MC_S_OK if there is such a constant color, or MC_E_NOTIMPL otherwise
    virtual MCCOMErr	MCCOMAPI GetConstantColor(TMCColorRGBA& resColor) const = 0;
    // ****************************************************************************
	//								GetTextureMultiplyColor
    //
	//  Get the texture multiply color
    virtual TMCColorRGB MCCOMAPI GetTextureMultiplyColor() const = 0;
    // ****************************************************************************
	//								GetBumpAmplitude
    //
	//  Get the bump amplitude
    virtual real MCCOMAPI GetBumpAmplitude() const = 0;
    // ****************************************************************************
	//								GetConstantValue
    //
	//  Get the constant value of the shader
    //
    // \return MC_S_OK if there is such a constant value, or MC_E_NOTIMPL otherwise
    virtual MCCOMErr	MCCOMAPI GetConstantValue(real& resValue) const = 0;
};

/// \}

#else 	//(qDemoVersion) begin scrambled interface

struct I3DExShader: public IMCUnknown
{		
	virtual MCCOMErr	MCCOMAPI GetShadingFlags(ShadingFlags& theFlags) = 0;
	virtual boolean		MCCOMAPI IsEqualTo(I3DExShader* aShader) = 0;
	virtual boolean		MCCOMAPI HasExplicitLightingModel(const LightingContext& lightingContext)=0;
	virtual MCCOMErr	MCCOMAPI DoShade(ShadingOut& result,ShadingIn& shadingIn) = 0;
	virtual EShaderOutput	MCCOMAPI GetImplementedOutput() = 0;
	virtual void		MCCOMAPI ConvertToPoly(TMCArray<TVector2>* vertices) = 0;
	virtual boolean		MCCOMAPI OutlineInPreviewMode() = 0;
	virtual void MCCOMAPI CalculateCaustics(TMCColorRGB& causticColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	virtual void MCCOMAPI CalculateIndirectLighting(TMCColorRGB& indirectDiffuseColor, real& ambientOcclusionFactor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	virtual void MCCOMAPI CalculateTransparency(TMCColorRGB& resColor,real32& outAlpha,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	virtual void MCCOMAPI CalculateAlpha(LightingDetail& result,const LightingContext& lightingContext,const ShadingOut& shading,TAbsorptionFunction* absorptionFunction) = 0;
	virtual void MCCOMAPI CalculateSubsurfaceScattering(TMCColorRGB& subsurfaceColor,const TMCColorRGB& currentColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	virtual MCCOMErr	MCCOMAPI GetShadersForChannel(const uint32& uvSpaceID, const uint32& channelIndex, TMCPtrArray<I3DShShader>& outShaders) = 0; 
	virtual MCCOMErr MCCOMAPI ShadeAndLight2(LightingDetail& result,const LightingContext& lightingContext,I3DShLightingModel* inDefaultLightingModel,TAbsorptionFunction* absorptionFunction)=0;
	virtual boolean		MCCOMAPI Contains(ShadingIn& shadingIn, TVector2& localUV) = 0;
	virtual void MCCOMAPI CalculateReflection(TMCColorRGB& reflectionColor,const LightingContext&	lightingContext,const ShadingOut& shading) = 0;
	virtual MCCOMErr	MCCOMAPI GetOriginalParametricTextureMap(const uint32& uvSpaceID, const uint32& channelIndex, IShTextureMap** outMap) = 0; 
	virtual real		MCCOMAPI GetValue(real& result,boolean& fullArea,ShadingIn& shadingIn) = 0;
	virtual boolean		MCCOMAPI WantsTransform() = 0;
	virtual real		MCCOMAPI GetColor(TMCColorRGBA& result,boolean& fullArea,ShadingIn& shadingIn) = 0;
	virtual real		MCCOMAPI GetVector(TVector3& result,ShadingIn& shadingIn) = 0;
	virtual MCCOMErr	MCCOMAPI GetBump(TVector3& result,ShadingIn& shadingIn) = 0;
	virtual void		MCCOMAPI GetReflection(TReflectionParameters& reflectionParams,const ShadingIn& shadingIn) = 0;
	virtual void		MCCOMAPI GetTransparency(TTransparencyParameters& transparencyParams,const ShadingIn& shadingIn) = 0;
	virtual void MCCOMAPI CalculateDirectLighting(LightingDetail& result,const LightingContext&	lightingContext) = 0;
	virtual MCCOMErr	MCCOMAPI SetDefaultParameters() = 0;
	virtual EShaderFunctionType MCCOMAPI GetSubShaderType(IDType keyword) = 0;
	virtual void		MCCOMAPI GetShaderPreview(IShParameterComponent** shader) = 0;
	virtual int16		MCCOMAPI GetSubShaderViewID(IDType keyword)  = 0;
	virtual boolean		MCCOMAPI GetSubShaderPreview(IShParameterComponent** shader, IShParameterComponent* subShader, FourCharT subShaderKeyword) = 0;
	virtual boolean		MCCOMAPI IsChannelConstantInUVSpace(const uint32& uvSpaceID, const uint32& channelIndex) = 0;
};

#endif	//(qDemoVersion) end scrambled

#endif
