Explorar el Código

Removed auto params

Marko Pintera hace 13 años
padre
commit
1b2dafa7c1

+ 0 - 662
CamelotRenderer/Include/CmGpuProgramParams.h

@@ -540,453 +540,6 @@ namespace CamelotEngine {
 	class CM_EXPORT GpuProgramParameters
 	{
 	public:
-		/** Defines the types of automatically updated values that may be bound to GpuProgram
-		parameters, or used to modify parameters on a per-object basis.
-		*/
-		enum AutoConstantType
-		{
-			/// The current world matrix
-			ACT_WORLD_MATRIX,
-			/// The current world matrix, inverted
-			ACT_INVERSE_WORLD_MATRIX,
-			/** Provides transpose of world matrix.
-			Equivalent to RenderMonkey's "WorldTranspose".
-			*/
-			ACT_TRANSPOSE_WORLD_MATRIX,
-			/// The current world matrix, inverted & transposed
-			ACT_INVERSE_TRANSPOSE_WORLD_MATRIX,
-
-
-			/// The current array of world matrices, as a 3x4 matrix, used for blending
-			ACT_WORLD_MATRIX_ARRAY_3x4,
-			/// The current array of world matrices, used for blending
-			ACT_WORLD_MATRIX_ARRAY,
-
-			/// The current view matrix
-			ACT_VIEW_MATRIX,
-			/// The current view matrix, inverted
-			ACT_INVERSE_VIEW_MATRIX,
-			/** Provides transpose of view matrix.
-			Equivalent to RenderMonkey's "ViewTranspose".
-			*/
-			ACT_TRANSPOSE_VIEW_MATRIX,
-			/** Provides inverse transpose of view matrix.
-			Equivalent to RenderMonkey's "ViewInverseTranspose".
-			*/
-			ACT_INVERSE_TRANSPOSE_VIEW_MATRIX,
-
-
-			/// The current projection matrix
-			ACT_PROJECTION_MATRIX,
-			/** Provides inverse of projection matrix.
-			Equivalent to RenderMonkey's "ProjectionInverse".
-			*/
-			ACT_INVERSE_PROJECTION_MATRIX,
-			/** Provides transpose of projection matrix.
-			Equivalent to RenderMonkey's "ProjectionTranspose".
-			*/
-			ACT_TRANSPOSE_PROJECTION_MATRIX,
-			/** Provides inverse transpose of projection matrix.
-			Equivalent to RenderMonkey's "ProjectionInverseTranspose".
-			*/
-			ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX,
-
-
-			/// The current view & projection matrices concatenated
-			ACT_VIEWPROJ_MATRIX,
-			/** Provides inverse of concatenated view and projection matrices.
-			Equivalent to RenderMonkey's "ViewProjectionInverse".
-			*/
-			ACT_INVERSE_VIEWPROJ_MATRIX,
-			/** Provides transpose of concatenated view and projection matrices.
-			Equivalent to RenderMonkey's "ViewProjectionTranspose".
-			*/
-			ACT_TRANSPOSE_VIEWPROJ_MATRIX,
-			/** Provides inverse transpose of concatenated view and projection matrices.
-			Equivalent to RenderMonkey's "ViewProjectionInverseTranspose".
-			*/
-			ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX,
-
-
-			/// The current world & view matrices concatenated
-			ACT_WORLDVIEW_MATRIX,
-			/// The current world & view matrices concatenated, then inverted
-			ACT_INVERSE_WORLDVIEW_MATRIX,
-			/** Provides transpose of concatenated world and view matrices.
-			Equivalent to RenderMonkey's "WorldViewTranspose".
-			*/
-			ACT_TRANSPOSE_WORLDVIEW_MATRIX,
-			/// The current world & view matrices concatenated, then inverted & transposed
-			ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX,
-			/// view matrices.
-
-
-			/// The current world, view & projection matrices concatenated
-			ACT_WORLDVIEWPROJ_MATRIX,
-			/** Provides inverse of concatenated world, view and projection matrices.
-			Equivalent to RenderMonkey's "WorldViewProjectionInverse".
-			*/
-			ACT_INVERSE_WORLDVIEWPROJ_MATRIX,
-			/** Provides transpose of concatenated world, view and projection matrices.
-			Equivalent to RenderMonkey's "WorldViewProjectionTranspose".
-			*/
-			ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX,
-			/** Provides inverse transpose of concatenated world, view and projection
-			matrices. Equivalent to RenderMonkey's "WorldViewProjectionInverseTranspose".
-			*/
-			ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX,
-
-
-			/// render target related values
-			/** -1 if requires texture flipping, +1 otherwise. It's useful when you bypassed
-			projection matrix transform, still able use this value to adjust transformed y position.
-			*/
-			ACT_RENDER_TARGET_FLIPPING,
-
-			/** -1 if the winding has been inverted (e.g. for reflections), +1 otherwise.
-			*/
-			ACT_VERTEX_WINDING,
-
-			/// Fog colour
-			ACT_FOG_COLOUR,
-			/// Fog params: density, linear start, linear end, 1/(end-start)
-			ACT_FOG_PARAMS,
-
-
-			/// Surface ambient colour, as set in Pass::setAmbient
-			ACT_SURFACE_AMBIENT_COLOUR,
-			/// Surface diffuse colour, as set in Pass::setDiffuse
-			ACT_SURFACE_DIFFUSE_COLOUR,
-			/// Surface specular colour, as set in Pass::setSpecular
-			ACT_SURFACE_SPECULAR_COLOUR,
-			/// Surface emissive colour, as set in Pass::setSelfIllumination
-			ACT_SURFACE_EMISSIVE_COLOUR,
-			/// Surface shininess, as set in Pass::setShininess
-			ACT_SURFACE_SHININESS,
-
-
-			/// The number of active light sources (better than gl_MaxLights)
-			ACT_LIGHT_COUNT,
-
-
-			/// The ambient light colour set in the scene
-			ACT_AMBIENT_LIGHT_COLOUR, 
-
-			/// Light diffuse colour (index determined by setAutoConstant call)
-			ACT_LIGHT_DIFFUSE_COLOUR,
-			/// Light specular colour (index determined by setAutoConstant call)
-			ACT_LIGHT_SPECULAR_COLOUR,
-			/// Light attenuation parameters, Vector4(range, constant, linear, quadric)
-			ACT_LIGHT_ATTENUATION,
-			/** Spotlight parameters, Vector4(innerFactor, outerFactor, falloff, isSpot)
-			innerFactor and outerFactor are cos(angle/2)
-			The isSpot parameter is 0.0f for non-spotlights, 1.0f for spotlights.
-			Also for non-spotlights the inner and outer factors are 1 and nearly 1 respectively
-			*/ 
-			ACT_SPOTLIGHT_PARAMS,
-			/// A light position in world space (index determined by setAutoConstant call)
-			ACT_LIGHT_POSITION,
-			/// A light position in object space (index determined by setAutoConstant call)
-			ACT_LIGHT_POSITION_OBJECT_SPACE,
-			/// A light position in view space (index determined by setAutoConstant call)
-			ACT_LIGHT_POSITION_VIEW_SPACE,
-			/// A light direction in world space (index determined by setAutoConstant call)
-			ACT_LIGHT_DIRECTION,
-			/// A light direction in object space (index determined by setAutoConstant call)
-			ACT_LIGHT_DIRECTION_OBJECT_SPACE,
-			/// A light direction in view space (index determined by setAutoConstant call)
-			ACT_LIGHT_DIRECTION_VIEW_SPACE,
-			/** The distance of the light from the center of the object
-			a useful approximation as an alternative to per-vertex distance
-			calculations.
-			*/
-			ACT_LIGHT_DISTANCE_OBJECT_SPACE,
-			/** Light power level, a single scalar as set in Light::setPowerScale  (index determined by setAutoConstant call) */
-			ACT_LIGHT_POWER_SCALE,
-			/// Light diffuse colour pre-scaled by Light::setPowerScale (index determined by setAutoConstant call)
-			ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED,
-			/// Light specular colour pre-scaled by Light::setPowerScale (index determined by setAutoConstant call)
-			ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED,
-			/// Array of light diffuse colours (count set by extra param)
-			ACT_LIGHT_DIFFUSE_COLOUR_ARRAY,
-			/// Array of light specular colours (count set by extra param)
-			ACT_LIGHT_SPECULAR_COLOUR_ARRAY,
-			/// Array of light diffuse colours scaled by light power (count set by extra param)
-			ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED_ARRAY,
-			/// Array of light specular colours scaled by light power (count set by extra param)
-			ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED_ARRAY,
-			/// Array of light attenuation parameters, Vector4(range, constant, linear, quadric) (count set by extra param)
-			ACT_LIGHT_ATTENUATION_ARRAY,
-			/// Array of light positions in world space (count set by extra param)
-			ACT_LIGHT_POSITION_ARRAY,
-			/// Array of light positions in object space (count set by extra param)
-			ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY,
-			/// Array of light positions in view space (count set by extra param)
-			ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY,
-			/// Array of light directions in world space (count set by extra param)
-			ACT_LIGHT_DIRECTION_ARRAY,
-			/// Array of light directions in object space (count set by extra param)
-			ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY,
-			/// Array of light directions in view space (count set by extra param)
-			ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY,
-			/** Array of distances of the lights from the center of the object
-			a useful approximation as an alternative to per-vertex distance
-			calculations. (count set by extra param)
-			*/
-			ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY,
-			/** Array of light power levels, a single scalar as set in Light::setPowerScale 
-			(count set by extra param)
-			*/
-			ACT_LIGHT_POWER_SCALE_ARRAY,
-			/** Spotlight parameters array of Vector4(innerFactor, outerFactor, falloff, isSpot)
-			innerFactor and outerFactor are cos(angle/2)
-			The isSpot parameter is 0.0f for non-spotlights, 1.0f for spotlights.
-			Also for non-spotlights the inner and outer factors are 1 and nearly 1 respectively.
-			(count set by extra param)
-			*/ 
-			ACT_SPOTLIGHT_PARAMS_ARRAY,
-
-			/** The derived ambient light colour, with 'r', 'g', 'b' components filled with
-			product of surface ambient colour and ambient light colour, respectively,
-			and 'a' component filled with surface ambient alpha component.
-			*/
-			ACT_DERIVED_AMBIENT_LIGHT_COLOUR,
-			/** The derived scene colour, with 'r', 'g' and 'b' components filled with sum
-			of derived ambient light colour and surface emissive colour, respectively,
-			and 'a' component filled with surface diffuse alpha component.
-			*/
-			ACT_DERIVED_SCENE_COLOUR,
-
-			/** The derived light diffuse colour (index determined by setAutoConstant call),
-			with 'r', 'g' and 'b' components filled with product of surface diffuse colour,
-			light power scale and light diffuse colour, respectively, and 'a' component filled with surface
-			diffuse alpha component.
-			*/
-			ACT_DERIVED_LIGHT_DIFFUSE_COLOUR,
-			/** The derived light specular colour (index determined by setAutoConstant call),
-			with 'r', 'g' and 'b' components filled with product of surface specular colour
-			and light specular colour, respectively, and 'a' component filled with surface
-			specular alpha component.
-			*/
-			ACT_DERIVED_LIGHT_SPECULAR_COLOUR,
-
-			/// Array of derived light diffuse colours (count set by extra param)
-			ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY,
-			/// Array of derived light specular colours (count set by extra param)
-			ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY,
-			/** The absolute light number of a local light index. Each pass may have
-			a number of lights passed to it, and each of these lights will have
-			an index in the overall light list, which will differ from the local
-			light index due to factors like setStartLight and setIteratePerLight.
-			This binding provides the global light index for a local index.
-			*/
-			ACT_LIGHT_NUMBER,
-			/// Returns (int) 1 if the  given light casts shadows, 0 otherwise (index set in extra param)
-			ACT_LIGHT_CASTS_SHADOWS,
-
-
-			/** The distance a shadow volume should be extruded when using
-			finite extrusion programs.
-			*/
-			ACT_SHADOW_EXTRUSION_DISTANCE,
-			/// The current camera's position in world space
-			ACT_CAMERA_POSITION,
-			/// The current camera's position in object space 
-			ACT_CAMERA_POSITION_OBJECT_SPACE,
-			/// The view/projection matrix of the assigned texture projection frustum
-			ACT_TEXTURE_VIEWPROJ_MATRIX,
-			/// Array of view/projection matrices of the first n texture projection frustums
-			ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY,
-			/** The view/projection matrix of the assigned texture projection frustum, 
-			combined with the current world matrix
-			*/
-			ACT_TEXTURE_WORLDVIEWPROJ_MATRIX,
-			/// Array of world/view/projection matrices of the first n texture projection frustums
-			ACT_TEXTURE_WORLDVIEWPROJ_MATRIX_ARRAY,
-			/// The view/projection matrix of a given spotlight
-			ACT_SPOTLIGHT_VIEWPROJ_MATRIX,
-			/// Array of view/projection matrix of a given spotlight
-			ACT_SPOTLIGHT_VIEWPROJ_MATRIX_ARRAY,
-			/** The view/projection matrix of a given spotlight projection frustum, 
-			combined with the current world matrix
-			*/
-			ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX,
-			/// A custom parameter which will come from the renderable, using 'data' as the identifier
-			ACT_CUSTOM,
-			/** provides current elapsed time
-			*/
-			ACT_TIME,
-			/** Single float value, which repeats itself based on given as
-			parameter "cycle time". Equivalent to RenderMonkey's "Time0_X".
-			*/
-			ACT_TIME_0_X,
-			/// Cosine of "Time0_X". Equivalent to RenderMonkey's "CosTime0_X".
-			ACT_COSTIME_0_X,
-			/// Sine of "Time0_X". Equivalent to RenderMonkey's "SinTime0_X".
-			ACT_SINTIME_0_X,
-			/// Tangent of "Time0_X". Equivalent to RenderMonkey's "TanTime0_X".
-			ACT_TANTIME_0_X,
-			/** Vector of "Time0_X", "SinTime0_X", "CosTime0_X", 
-			"TanTime0_X". Equivalent to RenderMonkey's "Time0_X_Packed".
-			*/
-			ACT_TIME_0_X_PACKED,
-			/** Single float value, which represents scaled time value [0..1],
-			which repeats itself based on given as parameter "cycle time".
-			Equivalent to RenderMonkey's "Time0_1".
-			*/
-			ACT_TIME_0_1,
-			/// Cosine of "Time0_1". Equivalent to RenderMonkey's "CosTime0_1".
-			ACT_COSTIME_0_1,
-			/// Sine of "Time0_1". Equivalent to RenderMonkey's "SinTime0_1".
-			ACT_SINTIME_0_1,
-			/// Tangent of "Time0_1". Equivalent to RenderMonkey's "TanTime0_1".
-			ACT_TANTIME_0_1,
-			/** Vector of "Time0_1", "SinTime0_1", "CosTime0_1",
-			"TanTime0_1". Equivalent to RenderMonkey's "Time0_1_Packed".
-			*/
-			ACT_TIME_0_1_PACKED,
-			/**	Single float value, which represents scaled time value [0..2*Pi],
-			which repeats itself based on given as parameter "cycle time".
-			Equivalent to RenderMonkey's "Time0_2PI".
-			*/
-			ACT_TIME_0_2PI,
-			/// Cosine of "Time0_2PI". Equivalent to RenderMonkey's "CosTime0_2PI".
-			ACT_COSTIME_0_2PI,
-			/// Sine of "Time0_2PI". Equivalent to RenderMonkey's "SinTime0_2PI".
-			ACT_SINTIME_0_2PI,
-			/// Tangent of "Time0_2PI". Equivalent to RenderMonkey's "TanTime0_2PI".
-			ACT_TANTIME_0_2PI,
-			/** Vector of "Time0_2PI", "SinTime0_2PI", "CosTime0_2PI",
-			"TanTime0_2PI". Equivalent to RenderMonkey's "Time0_2PI_Packed".
-			*/
-			ACT_TIME_0_2PI_PACKED,
-			/// provides the scaled frame time, returned as a floating point value.
-			ACT_FRAME_TIME,
-			/// provides the calculated frames per second, returned as a floating point value.
-			ACT_FPS,
-			/// viewport-related values
-			/** Current viewport width (in pixels) as floating point value.
-			Equivalent to RenderMonkey's "ViewportWidth".
-			*/
-			ACT_VIEWPORT_WIDTH,
-			/** Current viewport height (in pixels) as floating point value.
-			Equivalent to RenderMonkey's "ViewportHeight".
-			*/
-			ACT_VIEWPORT_HEIGHT,
-			/** This variable represents 1.0/ViewportWidth. 
-			Equivalent to RenderMonkey's "ViewportWidthInverse".
-			*/
-			ACT_INVERSE_VIEWPORT_WIDTH,
-			/** This variable represents 1.0/ViewportHeight.
-			Equivalent to RenderMonkey's "ViewportHeightInverse".
-			*/
-			ACT_INVERSE_VIEWPORT_HEIGHT,
-			/** Packed of "ViewportWidth", "ViewportHeight", "ViewportWidthInverse",
-			"ViewportHeightInverse".
-			*/
-			ACT_VIEWPORT_SIZE,
-
-			/// view parameters
-			/** This variable provides the view direction vector (world space).
-			Equivalent to RenderMonkey's "ViewDirection".
-			*/
-			ACT_VIEW_DIRECTION,
-			/** This variable provides the view side vector (world space).
-			Equivalent to RenderMonkey's "ViewSideVector".
-			*/
-			ACT_VIEW_SIDE_VECTOR,
-			/** This variable provides the view up vector (world space).
-			Equivalent to RenderMonkey's "ViewUpVector".
-			*/
-			ACT_VIEW_UP_VECTOR,
-			/** This variable provides the field of view as a floating point value.
-			Equivalent to RenderMonkey's "FOV".
-			*/
-			ACT_FOV,
-			/**	This variable provides the near clip distance as a floating point value.
-			Equivalent to RenderMonkey's "NearClipPlane".
-			*/
-			ACT_NEAR_CLIP_DISTANCE,
-			/**	This variable provides the far clip distance as a floating point value.
-			Equivalent to RenderMonkey's "FarClipPlane".
-			*/
-			ACT_FAR_CLIP_DISTANCE,
-
-			/** provides the pass index number within the technique
-			of the active materil.
-			*/
-			ACT_PASS_NUMBER,
-
-			/** provides the current iteration number of the pass. The iteration
-			number is the number of times the current render operation has
-			been drawn for the active pass.
-			*/
-			ACT_PASS_ITERATION_NUMBER,
-
-
-			/** Provides a parametric animation value [0..1], only available
-			where the renderable specifically implements it.
-			*/
-			ACT_ANIMATION_PARAMETRIC,
-
-			/** Provides the texel offsets required by this rendersystem to map
-			texels to pixels. Packed as 
-			float4(absoluteHorizontalOffset, absoluteVerticalOffset, 
-			horizontalOffset / viewportWidth, verticalOffset / viewportHeight)
-			*/
-			ACT_TEXEL_OFFSETS,
-
-			/** Provides information about the depth range of the scene as viewed
-			from the current camera. 
-			Passed as float4(minDepth, maxDepth, depthRange, 1 / depthRange)
-			*/
-			ACT_SCENE_DEPTH_RANGE,
-
-			/** Provides information about the depth range of the scene as viewed
-			from a given shadow camera. Requires an index parameter which maps
-			to a light index relative to the current light list.
-			Passed as float4(minDepth, maxDepth, depthRange, 1 / depthRange)
-			*/
-			ACT_SHADOW_SCENE_DEPTH_RANGE,
-
-			/** Provides the fixed shadow colour as configured via SceneManager::setShadowColour;
-			useful for integrated modulative shadows.
-			*/
-			ACT_SHADOW_COLOUR,
-			/** Provides texture size of the texture unit (index determined by setAutoConstant
-			call). Packed as float4(width, height, depth, 1)
-			*/
-			ACT_TEXTURE_SIZE,
-			/** Provides inverse texture size of the texture unit (index determined by setAutoConstant
-			call). Packed as float4(1 / width, 1 / height, 1 / depth, 1)
-			*/
-			ACT_INVERSE_TEXTURE_SIZE,
-			/** Provides packed texture size of the texture unit (index determined by setAutoConstant
-			call). Packed as float4(width, height, 1 / width, 1 / height)
-			*/
-			ACT_PACKED_TEXTURE_SIZE,
-
-			/** Provides the current transform matrix of the texture unit (index determined by setAutoConstant
-			call), as seen by the fixed-function pipeline. 
-			*/
-			ACT_TEXTURE_MATRIX, 
-
-			/** Provides the position of the LOD camera in world space, allowing you 
-			to perform separate LOD calculations in shaders independent of the rendering
-			camera. If there is no separate LOD camera then this is the real camera
-			position. See Camera::setLodCamera.
-			*/
-			ACT_LOD_CAMERA_POSITION, 
-			/** Provides the position of the LOD camera in object space, allowing you 
-			to perform separate LOD calculations in shaders independent of the rendering
-			camera. If there is no separate LOD camera then this is the real camera
-			position. See Camera::setLodCamera.
-			*/
-			ACT_LOD_CAMERA_POSITION_OBJECT_SPACE, 
-			/** Binds custom per-light constants to the shaders. */
-			ACT_LIGHT_CUSTOM
-		};
-
 		/** Defines the type of the extra data item used by the auto constant.
 
 		*/
@@ -1006,67 +559,9 @@ namespace CamelotEngine {
 			ET_REAL
 		};
 
-		/** Structure defining an auto constant that's available for use in 
-		a parameters object.
-		*/
-		struct AutoConstantDefinition
-		{
-			AutoConstantType acType;
-			String name;
-			size_t elementCount;
-			/// The type of the constant in the program
-			ElementType elementType;
-			/// The type of any extra data
-			ACDataType dataType;
-
-			AutoConstantDefinition(AutoConstantType _acType, const String& _name, 
-				size_t _elementCount, ElementType _elementType, 
-				ACDataType _dataType)
-				:acType(_acType), name(_name), elementCount(_elementCount), 
-				elementType(_elementType), dataType(_dataType)
-			{
-
-			}
-		};
-
-		/** Structure recording the use of an automatic parameter. */
-		class AutoConstantEntry
-		{
-		public:
-			/// The type of parameter
-			AutoConstantType paramType;
-			/// The target (physical) constant index
-			size_t physicalIndex;
-			/** The number of elements per individual entry in this constant
-			Used in case people used packed elements smaller than 4 (e.g. GLSL)
-			and bind an auto which is 4-element packed to it */
-			size_t elementCount;
-			/// Additional information to go with the parameter
-			union{
-				size_t data;
-				float fData;
-			};
-			/// The variability of this parameter (see GpuParamVariability)
-			UINT16 variability;
-
-			AutoConstantEntry(AutoConstantType theType, size_t theIndex, size_t theData, 
-				UINT16 theVariability, size_t theElemCount = 4)
-				: paramType(theType), physicalIndex(theIndex), elementCount(theElemCount), 
-				data(theData), variability(theVariability) {}
-
-			AutoConstantEntry(AutoConstantType theType, size_t theIndex, float theData, 
-				UINT16 theVariability, size_t theElemCount = 4)
-				: paramType(theType), physicalIndex(theIndex), elementCount(theElemCount), 
-				fData(theData), variability(theVariability) {}
-
-		};
-		// Auto parameter storage
-		typedef vector<AutoConstantEntry>::type AutoConstantList;
-
 		typedef vector<GpuSharedParametersUsage>::type GpuSharedParamUsageList;
 
 	protected:
-		static AutoConstantDefinition AutoConstantDictionary[];
 		/// Packed list of floating-point constants (physical indexing)
 		FloatConstantList mFloatConstants;
 		/// Packed list of integer constants (physical indexing)
@@ -1079,8 +574,6 @@ namespace CamelotEngine {
 		GpuLogicalBufferStructPtr mIntLogicalToPhysical;
 		/// Mapping from parameter names to def - high-level programs are expected to populate this
 		GpuNamedConstantsPtr mNamedConstants;
-		/// List of automatically updated parameters
-		AutoConstantList mAutoConstants;
 		/// The combined variability masks of all parameters
 		UINT16 mCombinedVariability;
 		/// Do we need to transpose matrices?
@@ -1097,9 +590,6 @@ namespace CamelotEngine {
 		*/
 		GpuLogicalIndexUse* _getIntConstantLogicalIndexUse(size_t logicalIndex, size_t requestedSize, UINT16 variability);
 
-		/// Return the variability for an auto constant
-		UINT16 deriveVariability(AutoConstantType act);
-
 		void copySharedParamSetUsage(const GpuSharedParamUsageList& srcList);
 
 		GpuSharedParamUsageList mSharedParamSets;
@@ -1363,98 +853,6 @@ namespace CamelotEngine {
 		int* getIntPointer(size_t pos) { return &mIntConstants[pos]; }
 		/// Get a pointer to the 'nth' item in the int buffer
 		const int* getIntPointer(size_t pos) const { return &mIntConstants[pos]; }
-		/// Get a reference to the list of auto constant bindings
-		const AutoConstantList& getAutoConstantList() const { return mAutoConstants; }
-
-		/** Sets up a constant which will automatically be updated by the system.
-		@remarks
-		Vertex and fragment programs often need parameters which are to do with the
-		current render state, or particular values which may very well change over time,
-		and often between objects which are being rendered. This feature allows you 
-		to set up a certain number of predefined parameter mappings that are kept up to 
-		date for you.
-		@param index The location in the constant list to place this updated constant every time
-		it is changed. Note that because of the nature of the types, we know how big the 
-		parameter details will be so you don't need to set that like you do for manual constants.
-		@param acType The type of automatic constant to set
-		@param extraInfo If the constant type needs more information (like a light index) put it here.
-		*/
-		void setAutoConstant(size_t index, AutoConstantType acType, size_t extraInfo = 0);
-		void setAutoConstantReal(size_t index, AutoConstantType acType, float rData);
-
-		/** Sets up a constant which will automatically be updated by the system.
-		@remarks
-		Vertex and fragment programs often need parameters which are to do with the
-		current render state, or particular values which may very well change over time,
-		and often between objects which are being rendered. This feature allows you 
-		to set up a certain number of predefined parameter mappings that are kept up to 
-		date for you.
-		@param index The location in the constant list to place this updated constant every time
-		it is changed. Note that because of the nature of the types, we know how big the 
-		parameter details will be so you don't need to set that like you do for manual constants.
-		@param acType The type of automatic constant to set
-		@param extraInfo1 The first extra parameter required by the auto constant type
-		@param extraInfo2 The first extra parameter required by the auto constant type
-		*/
-		void setAutoConstant(size_t index, AutoConstantType acType, UINT16 extraInfo1, UINT16 extraInfo2);
-
-		/** As setAutoConstant, but sets up the auto constant directly against a
-		physical buffer index.
-		*/
-		void _setRawAutoConstant(size_t physicalIndex, AutoConstantType acType, size_t extraInfo, 
-			UINT16 variability, size_t elementSize = 4);
-		/** As setAutoConstantReal, but sets up the auto constant directly against a
-		physical buffer index.
-		*/
-		void _setRawAutoConstantReal(size_t physicalIndex, AutoConstantType acType, float rData, 
-			UINT16 variability, size_t elementSize = 4);
-
-
-		/** Unbind an auto constant so that the constant is manually controlled again. */
-		void clearAutoConstant(size_t index);
-
-		/** Sets a named parameter up to track a derivation of the current time.
-		@param index The index of the parameter
-		@param factor The amount by which to scale the time value
-		*/  
-		void setConstantFromTime(size_t index, float factor);
-
-		/** Clears all the existing automatic constants. */
-		void clearAutoConstants(void);
-		typedef AutoConstantList::const_iterator AutoConstantIterator;
-		/** Gets an iterator over the automatic constant bindings currently in place. */
-		AutoConstantIterator getAutoConstantIterator(void) const;
-		/// Gets the number of int constants that have been set
-		size_t getAutoConstantCount(void) const { return mAutoConstants.size(); }
-		/** Gets a specific Auto Constant entry if index is in valid range
-		otherwise returns a NULL
-		@param index which entry is to be retrieved
-		*/
-		AutoConstantEntry* getAutoConstantEntry(const size_t index);
-		/** Returns true if this instance has any automatic constants. */
-		bool hasAutoConstants(void) const { return !(mAutoConstants.empty()); }
-		/** Finds an auto constant that's affecting a given logical parameter 
-		index for floating-point values.
-		@note Only applicable for low-level programs.
-		*/
-		const AutoConstantEntry* findFloatAutoConstantEntry(size_t logicalIndex);
-		/** Finds an auto constant that's affecting a given logical parameter 
-		index for integer values.
-		@note Only applicable for low-level programs.
-		*/
-		const AutoConstantEntry* findIntAutoConstantEntry(size_t logicalIndex);
-		/** Finds an auto constant that's affecting a given named parameter index.
-		@note Only applicable to high-level programs.
-		*/
-		const AutoConstantEntry* findAutoConstantEntry(const String& paramName);
-		/** Finds an auto constant that's affecting a given physical position in 
-		the floating-point buffer
-		*/
-		const AutoConstantEntry* _findRawAutoConstantEntryFloat(size_t physicalIndex);
-		/** Finds an auto constant that's affecting a given physical position in 
-		the integer buffer
-		*/
-		const AutoConstantEntry* _findRawAutoConstantEntryInt(size_t physicalIndex);
 
 		/** Tells the program whether to ignore missing parameters or not.
 		*/
@@ -1592,52 +990,6 @@ namespace CamelotEngine {
 		void setNamedConstant(const String& name, const int *val, size_t count, 
 			size_t multiple = 4);
 
-		/** Sets up a constant which will automatically be updated by the system.
-		@remarks
-		Vertex and fragment programs often need parameters which are to do with the
-		current render state, or particular values which may very well change over time,
-		and often between objects which are being rendered. This feature allows you 
-		to set up a certain number of predefined parameter mappings that are kept up to 
-		date for you.
-		@note
-		This named option will only work if you are using a parameters object created
-		from a high-level program (HighLevelGpuProgram).
-		@param name The name of the parameter
-		@param acType The type of automatic constant to set
-		@param extraInfo If the constant type needs more information (like a light index) put it here.
-		*/
-		void setNamedAutoConstant(const String& name, AutoConstantType acType, size_t extraInfo = 0);
-		void setNamedAutoConstantReal(const String& name, AutoConstantType acType, float rData);
-
-		/** Sets up a constant which will automatically be updated by the system.
-		@remarks
-		Vertex and fragment programs often need parameters which are to do with the
-		current render state, or particular values which may very well change over time,
-		and often between objects which are being rendered. This feature allows you 
-		to set up a certain number of predefined parameter mappings that are kept up to 
-		date for you.
-		@note
-		This named option will only work if you are using a parameters object created
-		from a high-level program (HighLevelGpuProgram).
-		@param name The name of the parameter
-		@param acType The type of automatic constant to set
-		@param extraInfo1 The first extra info required by this auto constant type
-		@param extraInfo2 The first extra info required by this auto constant type
-		*/
-		void setNamedAutoConstant(const String& name, AutoConstantType acType, UINT16 extraInfo1, UINT16 extraInfo2);
-
-		/** Sets a named parameter up to track a derivation of the current time.
-		@note
-		This named option will only work if you are using a parameters object created
-		from a high-level program (HighLevelGpuProgram).
-		@param name The name of the parameter
-		@param factor The amount by which to scale the time value
-		*/  
-		void setNamedConstantFromTime(const String& name, float factor);
-
-		/** Unbind an auto constant so that the constant is manually controlled again. */
-		void clearNamedAutoConstant(const String& name);
-
 		/** Find a constant definition for a named parameter.
 		@remarks
 		This method returns null if the named parameter did not exist, unlike
@@ -1693,20 +1045,6 @@ namespace CamelotEngine {
 		*/
 		void copyMatchingNamedConstantsFrom(const GpuProgramParameters& source);
 
-		/** gets the auto constant definition associated with name if found else returns NULL
-		@param name The name of the auto constant
-		*/
-		static const AutoConstantDefinition* getAutoConstantDefinition(const String& name);
-		/** gets the auto constant definition using an index into the auto constant definition array.
-		If the index is out of bounds then NULL is returned;
-		@param idx The auto constant index
-		*/
-		static const AutoConstantDefinition* getAutoConstantDefinition(const size_t idx);
-		/** Returns the number of auto constant definitions
-		*/
-		static size_t getNumAutoConstantDefinitions(void);
-
-
 		/** increments the multipass number entry by 1 if it exists
 		*/
 		void incPassIterationNumber(void);

+ 0 - 694
CamelotRenderer/Source/CmGpuProgramParams.cpp

@@ -36,151 +36,6 @@ THE SOFTWARE.
 namespace CamelotEngine
 {
 
-	//---------------------------------------------------------------------
-	GpuProgramParameters::AutoConstantDefinition GpuProgramParameters::AutoConstantDictionary[] = {
-		AutoConstantDefinition(ACT_WORLD_MATRIX,                  "world_matrix",                16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_WORLD_MATRIX,          "inverse_world_matrix",        16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_WORLD_MATRIX,             "transpose_world_matrix",            16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_WORLD_MATRIX, "inverse_transpose_world_matrix", 16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_WORLD_MATRIX_ARRAY_3x4,        "world_matrix_array_3x4",      12, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_WORLD_MATRIX_ARRAY,            "world_matrix_array",          16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_VIEW_MATRIX,                   "view_matrix",                 16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_VIEW_MATRIX,           "inverse_view_matrix",         16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_VIEW_MATRIX,              "transpose_view_matrix",             16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_VIEW_MATRIX,       "inverse_transpose_view_matrix",     16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_PROJECTION_MATRIX,             "projection_matrix",           16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_PROJECTION_MATRIX,          "inverse_projection_matrix",         16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_PROJECTION_MATRIX,        "transpose_projection_matrix",       16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX, "inverse_transpose_projection_matrix", 16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_VIEWPROJ_MATRIX,               "viewproj_matrix",             16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_VIEWPROJ_MATRIX,       "inverse_viewproj_matrix",     16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_VIEWPROJ_MATRIX,          "transpose_viewproj_matrix",         16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX,   "inverse_transpose_viewproj_matrix", 16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_WORLDVIEW_MATRIX,              "worldview_matrix",            16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_WORLDVIEW_MATRIX,      "inverse_worldview_matrix",    16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_WORLDVIEW_MATRIX,         "transpose_worldview_matrix",        16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX, "inverse_transpose_worldview_matrix", 16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_WORLDVIEWPROJ_MATRIX,          "worldviewproj_matrix",        16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_WORLDVIEWPROJ_MATRIX,       "inverse_worldviewproj_matrix",      16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX,     "transpose_worldviewproj_matrix",    16, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX, "inverse_transpose_worldviewproj_matrix", 16, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_RENDER_TARGET_FLIPPING,          "render_target_flipping",         1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VERTEX_WINDING,          "vertex_winding",         1, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_FOG_COLOUR,                    "fog_colour",                   4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_FOG_PARAMS,                    "fog_params",                   4, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_SURFACE_AMBIENT_COLOUR,          "surface_ambient_colour",           4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SURFACE_DIFFUSE_COLOUR,          "surface_diffuse_colour",           4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SURFACE_SPECULAR_COLOUR,         "surface_specular_colour",          4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SURFACE_EMISSIVE_COLOUR,         "surface_emissive_colour",          4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SURFACE_SHININESS,               "surface_shininess",                1, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_LIGHT_COUNT,                   "light_count",                  1, ET_REAL, ACDT_NONE),
-
-		AutoConstantDefinition(ACT_AMBIENT_LIGHT_COLOUR,          "ambient_light_colour",         4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_LIGHT_DIFFUSE_COLOUR,          "light_diffuse_colour",         4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_SPECULAR_COLOUR,         "light_specular_colour",        4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_ATTENUATION,             "light_attenuation",            4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SPOTLIGHT_PARAMS,              "spotlight_params",             4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION,                "light_position",               4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION_OBJECT_SPACE,   "light_position_object_space",  4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION_VIEW_SPACE,          "light_position_view_space",    4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION,               "light_direction",              4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION_OBJECT_SPACE,  "light_direction_object_space", 4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION_VIEW_SPACE,         "light_direction_view_space",   4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DISTANCE_OBJECT_SPACE,   "light_distance_object_space",  1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POWER_SCALE,   		  "light_power",  1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED, "light_diffuse_colour_power_scaled",         4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED, "light_specular_colour_power_scaled",        4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIFFUSE_COLOUR_ARRAY,          "light_diffuse_colour_array",         4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_SPECULAR_COLOUR_ARRAY,         "light_specular_colour_array",        4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED_ARRAY, "light_diffuse_colour_power_scaled_array",         4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED_ARRAY, "light_specular_colour_power_scaled_array",        4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_ATTENUATION_ARRAY,             "light_attenuation_array",            4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION_ARRAY,                "light_position_array",               4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY,   "light_position_object_space_array",  4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY,          "light_position_view_space_array",    4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION_ARRAY,               "light_direction_array",              4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY,  "light_direction_object_space_array", 4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY,         "light_direction_view_space_array",   4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY,   "light_distance_object_space_array",  1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_POWER_SCALE_ARRAY,   		  "light_power_array",  1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SPOTLIGHT_PARAMS_ARRAY,              "spotlight_params_array",             4, ET_REAL, ACDT_INT),
-
-		AutoConstantDefinition(ACT_DERIVED_AMBIENT_LIGHT_COLOUR,    "derived_ambient_light_colour",     4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_DERIVED_SCENE_COLOUR,            "derived_scene_colour",             4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_DERIVED_LIGHT_DIFFUSE_COLOUR,    "derived_light_diffuse_colour",     4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_DERIVED_LIGHT_SPECULAR_COLOUR,   "derived_light_specular_colour",    4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY,  "derived_light_diffuse_colour_array",   4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY, "derived_light_specular_colour_array",  4, ET_REAL, ACDT_INT),
-
-		AutoConstantDefinition(ACT_LIGHT_NUMBER,   					  "light_number",  1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LIGHT_CASTS_SHADOWS, 			  "light_casts_shadows",  1, ET_REAL, ACDT_INT),
-
-		AutoConstantDefinition(ACT_SHADOW_EXTRUSION_DISTANCE,     "shadow_extrusion_distance",    1, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_CAMERA_POSITION,               "camera_position",              3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_CAMERA_POSITION_OBJECT_SPACE,  "camera_position_object_space", 3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TEXTURE_VIEWPROJ_MATRIX,       "texture_viewproj_matrix",     16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY, "texture_viewproj_matrix_array", 16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_TEXTURE_WORLDVIEWPROJ_MATRIX,  "texture_worldviewproj_matrix",16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_TEXTURE_WORLDVIEWPROJ_MATRIX_ARRAY, "texture_worldviewproj_matrix_array",16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SPOTLIGHT_VIEWPROJ_MATRIX,       "spotlight_viewproj_matrix",     16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SPOTLIGHT_VIEWPROJ_MATRIX_ARRAY, "spotlight_viewproj_matrix_array", 16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX,  "spotlight_worldviewproj_matrix",16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_CUSTOM,                        "custom",                       4, ET_REAL, ACDT_INT),  // *** needs to be tested
-		AutoConstantDefinition(ACT_TIME,                               "time",                               1, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_X,                      "time_0_x",                     4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_COSTIME_0_X,                   "costime_0_x",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_SINTIME_0_X,                   "sintime_0_x",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TANTIME_0_X,                   "tantime_0_x",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_X_PACKED,               "time_0_x_packed",              4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_1,                      "time_0_1",                     4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_COSTIME_0_1,                   "costime_0_1",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_SINTIME_0_1,                   "sintime_0_1",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TANTIME_0_1,                   "tantime_0_1",                  4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_1_PACKED,               "time_0_1_packed",              4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_2PI,                    "time_0_2pi",                   4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_COSTIME_0_2PI,                 "costime_0_2pi",                4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_SINTIME_0_2PI,                 "sintime_0_2pi",                4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TANTIME_0_2PI,                 "tantime_0_2pi",                4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_TIME_0_2PI_PACKED,             "time_0_2pi_packed",            4, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_FRAME_TIME,                    "frame_time",                   1, ET_REAL, ACDT_REAL),
-		AutoConstantDefinition(ACT_FPS,                           "fps",                          1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEWPORT_WIDTH,                "viewport_width",               1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEWPORT_HEIGHT,               "viewport_height",              1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_VIEWPORT_WIDTH,        "inverse_viewport_width",       1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_INVERSE_VIEWPORT_HEIGHT,       "inverse_viewport_height",      1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEWPORT_SIZE,                 "viewport_size",                4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEW_DIRECTION,                "view_direction",               3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEW_SIDE_VECTOR,              "view_side_vector",             3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_VIEW_UP_VECTOR,                "view_up_vector",               3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_FOV,                           "fov",                          1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_NEAR_CLIP_DISTANCE,            "near_clip_distance",           1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_FAR_CLIP_DISTANCE,             "far_clip_distance",            1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_PASS_NUMBER,                        "pass_number",                        1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_PASS_ITERATION_NUMBER,              "pass_iteration_number",              1, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_ANIMATION_PARAMETRIC,               "animation_parametric",               4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_TEXEL_OFFSETS,               "texel_offsets",				  4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SCENE_DEPTH_RANGE,           "scene_depth_range",			  4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_SHADOW_SCENE_DEPTH_RANGE,    "shadow_scene_depth_range",		  4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_SHADOW_COLOUR,				"shadow_colour",				  4, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_TEXTURE_SIZE,                "texture_size",                   4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_INVERSE_TEXTURE_SIZE,        "inverse_texture_size",           4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_PACKED_TEXTURE_SIZE,         "packed_texture_size",            4, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_TEXTURE_MATRIX,  "texture_matrix", 16, ET_REAL, ACDT_INT),
-		AutoConstantDefinition(ACT_LOD_CAMERA_POSITION,               "lod_camera_position",              3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_LOD_CAMERA_POSITION_OBJECT_SPACE,  "lod_camera_position_object_space", 3, ET_REAL, ACDT_NONE),
-		AutoConstantDefinition(ACT_LIGHT_CUSTOM,	"light_custom", 4, ET_REAL, ACDT_INT)
-	};
-
 	bool GpuNamedConstants::msGenerateAllConstantDefinitionArrayEntries = false;
 
 	//---------------------------------------------------------------------
@@ -591,7 +446,6 @@ namespace CamelotEngine
 		// AutoConstantEntry, RealConstantEntry, IntConstantEntry
 		mFloatConstants = oth.mFloatConstants;
 		mIntConstants  = oth.mIntConstants;
-		mAutoConstants = oth.mAutoConstants;
 		mFloatLogicalToPhysical = oth.mFloatLogicalToPhysical;
 		mIntLogicalToPhysical = oth.mIntLogicalToPhysical;
 		mNamedConstants = oth.mNamedConstants;
@@ -857,162 +711,6 @@ namespace CamelotEngine
 		memcpy(dest, &mIntConstants[physicalIndex], sizeof(int) * count);
 	}
 	//---------------------------------------------------------------------
-	UINT16 GpuProgramParameters::deriveVariability(GpuProgramParameters::AutoConstantType act)
-	{
-		switch(act)
-		{
-		case ACT_VIEW_MATRIX:
-		case ACT_INVERSE_VIEW_MATRIX:
-		case ACT_TRANSPOSE_VIEW_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_VIEW_MATRIX:
-		case ACT_PROJECTION_MATRIX:
-		case ACT_INVERSE_PROJECTION_MATRIX:
-		case ACT_TRANSPOSE_PROJECTION_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_PROJECTION_MATRIX:
-		case ACT_VIEWPROJ_MATRIX:
-		case ACT_INVERSE_VIEWPROJ_MATRIX:
-		case ACT_TRANSPOSE_VIEWPROJ_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_VIEWPROJ_MATRIX:
-		case ACT_RENDER_TARGET_FLIPPING:
-		case ACT_VERTEX_WINDING:
-		case ACT_AMBIENT_LIGHT_COLOUR: 
-		case ACT_DERIVED_AMBIENT_LIGHT_COLOUR:
-		case ACT_DERIVED_SCENE_COLOUR:
-		case ACT_FOG_COLOUR:
-		case ACT_FOG_PARAMS:
-		case ACT_SURFACE_AMBIENT_COLOUR:
-		case ACT_SURFACE_DIFFUSE_COLOUR:
-		case ACT_SURFACE_SPECULAR_COLOUR:
-		case ACT_SURFACE_EMISSIVE_COLOUR:
-		case ACT_SURFACE_SHININESS:
-		case ACT_CAMERA_POSITION:
-		case ACT_TIME:
-		case ACT_TIME_0_X:
-		case ACT_COSTIME_0_X:
-		case ACT_SINTIME_0_X:
-		case ACT_TANTIME_0_X:
-		case ACT_TIME_0_X_PACKED:
-		case ACT_TIME_0_1:
-		case ACT_COSTIME_0_1:
-		case ACT_SINTIME_0_1:
-		case ACT_TANTIME_0_1:
-		case ACT_TIME_0_1_PACKED:
-		case ACT_TIME_0_2PI:
-		case ACT_COSTIME_0_2PI:
-		case ACT_SINTIME_0_2PI:
-		case ACT_TANTIME_0_2PI:
-		case ACT_TIME_0_2PI_PACKED:
-		case ACT_FRAME_TIME:
-		case ACT_FPS:
-		case ACT_VIEWPORT_WIDTH:
-		case ACT_VIEWPORT_HEIGHT:
-		case ACT_INVERSE_VIEWPORT_WIDTH:
-		case ACT_INVERSE_VIEWPORT_HEIGHT:
-		case ACT_VIEWPORT_SIZE:
-		case ACT_TEXEL_OFFSETS:
-		case ACT_TEXTURE_SIZE:
-		case ACT_INVERSE_TEXTURE_SIZE:
-		case ACT_PACKED_TEXTURE_SIZE:
-		case ACT_SCENE_DEPTH_RANGE:
-		case ACT_VIEW_DIRECTION:
-		case ACT_VIEW_SIDE_VECTOR:
-		case ACT_VIEW_UP_VECTOR:
-		case ACT_FOV:
-		case ACT_NEAR_CLIP_DISTANCE:
-		case ACT_FAR_CLIP_DISTANCE:
-		case ACT_PASS_NUMBER:
-		case ACT_TEXTURE_MATRIX:
-		case ACT_LOD_CAMERA_POSITION:
-
-			return (UINT16)GPV_GLOBAL;
-
-		case ACT_WORLD_MATRIX:
-		case ACT_INVERSE_WORLD_MATRIX:
-		case ACT_TRANSPOSE_WORLD_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_WORLD_MATRIX:
-		case ACT_WORLD_MATRIX_ARRAY_3x4:
-		case ACT_WORLD_MATRIX_ARRAY:
-		case ACT_WORLDVIEW_MATRIX:
-		case ACT_INVERSE_WORLDVIEW_MATRIX:
-		case ACT_TRANSPOSE_WORLDVIEW_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_WORLDVIEW_MATRIX:
-		case ACT_WORLDVIEWPROJ_MATRIX:
-		case ACT_INVERSE_WORLDVIEWPROJ_MATRIX:
-		case ACT_TRANSPOSE_WORLDVIEWPROJ_MATRIX:
-		case ACT_INVERSE_TRANSPOSE_WORLDVIEWPROJ_MATRIX:
-		case ACT_CAMERA_POSITION_OBJECT_SPACE:
-		case ACT_LOD_CAMERA_POSITION_OBJECT_SPACE:
-		case ACT_CUSTOM:
-		case ACT_ANIMATION_PARAMETRIC:
-
-			return (UINT16)GPV_PER_OBJECT;
-
-		case ACT_LIGHT_POSITION_OBJECT_SPACE:
-		case ACT_LIGHT_DIRECTION_OBJECT_SPACE:
-		case ACT_LIGHT_DISTANCE_OBJECT_SPACE:
-		case ACT_LIGHT_POSITION_OBJECT_SPACE_ARRAY:
-		case ACT_LIGHT_DIRECTION_OBJECT_SPACE_ARRAY:
-		case ACT_LIGHT_DISTANCE_OBJECT_SPACE_ARRAY:
-		case ACT_TEXTURE_WORLDVIEWPROJ_MATRIX:
-		case ACT_TEXTURE_WORLDVIEWPROJ_MATRIX_ARRAY:
-		case ACT_SPOTLIGHT_WORLDVIEWPROJ_MATRIX:
-
-			// These depend on BOTH lights and objects
-			return ((UINT16)GPV_PER_OBJECT) | ((UINT16)GPV_LIGHTS);
-
-		case ACT_LIGHT_COUNT:
-		case ACT_LIGHT_DIFFUSE_COLOUR:
-		case ACT_LIGHT_SPECULAR_COLOUR:
-		case ACT_LIGHT_POSITION:
-		case ACT_LIGHT_DIRECTION:
-		case ACT_LIGHT_POSITION_VIEW_SPACE:
-		case ACT_LIGHT_DIRECTION_VIEW_SPACE:
-		case ACT_SHADOW_EXTRUSION_DISTANCE:
-		case ACT_SHADOW_SCENE_DEPTH_RANGE:
-		case ACT_SHADOW_COLOUR:
-		case ACT_LIGHT_POWER_SCALE:
-		case ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED:
-		case ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED:
-		case ACT_LIGHT_NUMBER:
-		case ACT_LIGHT_CASTS_SHADOWS:
-		case ACT_LIGHT_ATTENUATION:
-		case ACT_SPOTLIGHT_PARAMS:
-		case ACT_LIGHT_DIFFUSE_COLOUR_ARRAY:
-		case ACT_LIGHT_SPECULAR_COLOUR_ARRAY:
-		case ACT_LIGHT_DIFFUSE_COLOUR_POWER_SCALED_ARRAY:
-		case ACT_LIGHT_SPECULAR_COLOUR_POWER_SCALED_ARRAY:
-		case ACT_LIGHT_POSITION_ARRAY:
-		case ACT_LIGHT_DIRECTION_ARRAY:
-		case ACT_LIGHT_POSITION_VIEW_SPACE_ARRAY:
-		case ACT_LIGHT_DIRECTION_VIEW_SPACE_ARRAY:
-		case ACT_LIGHT_POWER_SCALE_ARRAY:
-		case ACT_LIGHT_ATTENUATION_ARRAY:
-		case ACT_SPOTLIGHT_PARAMS_ARRAY:
-		case ACT_TEXTURE_VIEWPROJ_MATRIX:
-		case ACT_TEXTURE_VIEWPROJ_MATRIX_ARRAY:
-		case ACT_SPOTLIGHT_VIEWPROJ_MATRIX:
-		case ACT_SPOTLIGHT_VIEWPROJ_MATRIX_ARRAY:
-		case ACT_LIGHT_CUSTOM:
-
-			return (UINT16)GPV_LIGHTS;
-
-		case ACT_DERIVED_LIGHT_DIFFUSE_COLOUR:
-		case ACT_DERIVED_LIGHT_SPECULAR_COLOUR:
-		case ACT_DERIVED_LIGHT_DIFFUSE_COLOUR_ARRAY:
-		case ACT_DERIVED_LIGHT_SPECULAR_COLOUR_ARRAY:
-
-			return ((UINT16)GPV_GLOBAL | (UINT16)GPV_LIGHTS);
-
-		case ACT_PASS_ITERATION_NUMBER:
-
-			return (UINT16)GPV_PASS_ITERATION_NUMBER;
-
-		default:
-			return (UINT16)GPV_GLOBAL;
-		};
-
-	}
-	//---------------------------------------------------------------------
 	GpuLogicalIndexUse* GpuProgramParameters::_getFloatConstantLogicalIndexUse(
 		size_t logicalIndex, size_t requestedSize, UINT16 variability)
 	{
@@ -1088,15 +786,6 @@ namespace CamelotEngine
 						i->second.physicalIndex += insertCount;
 				}
 				mFloatLogicalToPhysical->bufferSize += insertCount;
-				for (AutoConstantList::iterator i = mAutoConstants.begin();
-					i != mAutoConstants.end(); ++i)
-				{
-					if (i->physicalIndex > physicalIndex &&
-						getAutoConstantDefinition(i->paramType)->elementType == ET_REAL)
-					{
-						i->physicalIndex += insertCount;
-					}
-				}
 				if (mNamedConstants != nullptr)
 				{
 					for (GpuConstantDefinitionMap::iterator i = mNamedConstants->map.begin();
@@ -1195,15 +884,6 @@ namespace CamelotEngine
 						i->second.physicalIndex += insertCount;
 				}
 				mIntLogicalToPhysical->bufferSize += insertCount;
-				for (AutoConstantList::iterator i = mAutoConstants.begin();
-					i != mAutoConstants.end(); ++i)
-				{
-					if (i->physicalIndex > physicalIndex &&
-						getAutoConstantDefinition(i->paramType)->elementType == ET_INT)
-					{
-						i->physicalIndex += insertCount;
-					}
-				}
 				if (mNamedConstants != nullptr)
 				{
 					for (GpuConstantDefinitionMap::iterator i = mNamedConstants->map.begin();
@@ -1337,162 +1017,6 @@ namespace CamelotEngine
 		}
 	}
 	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::setAutoConstant(size_t index, AutoConstantType acType, size_t extraInfo)
-	{
-		// Get auto constant definition for sizing
-		const AutoConstantDefinition* autoDef = getAutoConstantDefinition(acType);
-		// round up to nearest multiple of 4
-		size_t sz = autoDef->elementCount;
-		if (sz % 4 > 0)
-		{
-			sz += 4 - (sz % 4);
-		}
-
-		GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(index, sz, deriveVariability(acType));
-
-		_setRawAutoConstant(indexUse->physicalIndex, acType, extraInfo, indexUse->variability, sz);
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::_setRawAutoConstant(size_t physicalIndex, 
-		AutoConstantType acType, size_t extraInfo, UINT16 variability, size_t elementSize)
-	{
-		// update existing index if it exists
-		bool found = false;
-		for (AutoConstantList::iterator i = mAutoConstants.begin(); 
-			i != mAutoConstants.end(); ++i)
-		{
-			if (i->physicalIndex == physicalIndex)
-			{
-				i->paramType = acType;
-				i->data = extraInfo;
-				i->elementCount = elementSize;
-				i->variability = variability;
-				found = true;
-				break;
-			}
-		}
-		if (!found)
-			mAutoConstants.push_back(AutoConstantEntry(acType, physicalIndex, extraInfo, variability, elementSize));
-
-		mCombinedVariability |= variability;
-
-
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::setAutoConstant(size_t index, AutoConstantType acType, UINT16 extraInfo1, UINT16 extraInfo2)
-	{
-		size_t extraInfo = (size_t)extraInfo1 | ((size_t)extraInfo2) << 16;
-
-		// Get auto constant definition for sizing
-		const AutoConstantDefinition* autoDef = getAutoConstantDefinition(acType);
-		// round up to nearest multiple of 4
-		size_t sz = autoDef->elementCount;
-		if (sz % 4 > 0)
-		{
-			sz += 4 - (sz % 4);
-		}
-
-		GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(index, sz, deriveVariability(acType));
-
-		_setRawAutoConstant(indexUse->physicalIndex, acType, extraInfo, indexUse->variability, sz);
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::_setRawAutoConstantReal(size_t physicalIndex, 
-		AutoConstantType acType, float rData, UINT16 variability, size_t elementSize)
-	{
-		// update existing index if it exists
-		bool found = false;
-		for (AutoConstantList::iterator i = mAutoConstants.begin(); 
-			i != mAutoConstants.end(); ++i)
-		{
-			if (i->physicalIndex == physicalIndex)
-			{
-				i->paramType = acType;
-				i->fData = rData;
-				i->elementCount = elementSize;
-				i->variability = variability;
-				found = true;
-				break;
-			}
-		}
-		if (!found)
-			mAutoConstants.push_back(AutoConstantEntry(acType, physicalIndex, rData, variability, elementSize));
-
-		mCombinedVariability |= variability;
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::clearAutoConstant(size_t index)
-	{
-		GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(index, 0, GPV_GLOBAL);
-
-		if (indexUse)
-		{
-			indexUse->variability = GPV_GLOBAL;
-			size_t physicalIndex = indexUse->physicalIndex;
-			// update existing index if it exists
-			for (AutoConstantList::iterator i = mAutoConstants.begin(); 
-				i != mAutoConstants.end(); ++i)
-			{
-				if (i->physicalIndex == physicalIndex)
-				{
-					mAutoConstants.erase(i);
-					break;
-				}
-			}
-		}
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::clearNamedAutoConstant(const String& name)
-	{
-		const GpuConstantDefinition* def = _findNamedConstantDefinition(name);
-		if (def)
-		{
-			def->variability = GPV_GLOBAL;
-
-			// Autos are always floating point
-			if (def->isFloat())
-			{
-				for (AutoConstantList::iterator i = mAutoConstants.begin(); 
-					i != mAutoConstants.end(); ++i)
-				{
-					if (i->physicalIndex == def->physicalIndex)
-					{
-						mAutoConstants.erase(i);
-						break;
-					}
-				}
-			}
-
-		}
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::clearAutoConstants(void)
-	{
-		mAutoConstants.clear();
-		mCombinedVariability = GPV_GLOBAL;
-	}
-	//-----------------------------------------------------------------------------
-	GpuProgramParameters::AutoConstantIterator GpuProgramParameters::getAutoConstantIterator(void) const
-	{
-		return mAutoConstants.begin();
-	}
-	//-----------------------------------------------------------------------------
-	void GpuProgramParameters::setAutoConstantReal(size_t index, AutoConstantType acType, float rData)
-	{
-		// Get auto constant definition for sizing
-		const AutoConstantDefinition* autoDef = getAutoConstantDefinition(acType);
-		// round up to nearest multiple of 4
-		size_t sz = autoDef->elementCount;
-		if (sz % 4 > 0)
-		{
-			sz += 4 - (sz % 4);
-		}
-
-		GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(index, sz, deriveVariability(acType));
-
-		_setRawAutoConstantReal(indexUse->physicalIndex, acType, rData, indexUse->variability, sz);
-	}
-	//-----------------------------------------------------------------------------
 	void GpuProgramParameters::setNamedConstant(const String& name, float val)
 	{
 		// look up, and throw an exception if we're not ignoring missing
@@ -1590,165 +1114,11 @@ namespace CamelotEngine
 			_writeRawConstants(def->physicalIndex, val, rawCount);
 	}
 	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setNamedAutoConstant(const String& name, 
-		AutoConstantType acType, size_t extraInfo)
-	{
-		// look up, and throw an exception if we're not ignoring missing
-		const GpuConstantDefinition* def = 
-			_findNamedConstantDefinition(name, !mIgnoreMissingParams);
-		if (def)
-		{
-			def->variability = deriveVariability(acType);
-			// make sure we also set variability on the logical index map
-			GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(def->logicalIndex, def->elementSize * def->arraySize, def->variability);
-			if (indexUse)
-				indexUse->variability = def->variability;
-
-			_setRawAutoConstant(def->physicalIndex, acType, extraInfo, def->variability, def->elementSize);
-		}
-
-	}
-	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setNamedAutoConstantReal(const String& name, 
-		AutoConstantType acType, float rData)
-	{
-		// look up, and throw an exception if we're not ignoring missing
-		const GpuConstantDefinition* def = 
-			_findNamedConstantDefinition(name, !mIgnoreMissingParams);
-		if (def)
-		{
-			def->variability = deriveVariability(acType);
-			// make sure we also set variability on the logical index map
-			GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(def->logicalIndex, def->elementSize * def->arraySize, def->variability);
-			if (indexUse)
-				indexUse->variability = def->variability;
-			_setRawAutoConstantReal(def->physicalIndex, acType, rData, def->variability, def->elementSize);
-		}
-	}
-	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setNamedAutoConstant(const String& name, 
-		AutoConstantType acType, UINT16 extraInfo1, UINT16 extraInfo2)
-	{
-		size_t extraInfo = (size_t)extraInfo1 | ((size_t)extraInfo2) << 16;
-
-		// look up, and throw an exception if we're not ignoring missing
-		const GpuConstantDefinition* def = 
-			_findNamedConstantDefinition(name, !mIgnoreMissingParams);
-		if (def)
-		{
-			def->variability = deriveVariability(acType);
-			// make sure we also set variability on the logical index map
-			GpuLogicalIndexUse* indexUse = _getFloatConstantLogicalIndexUse(def->logicalIndex, def->elementSize * def->arraySize, def->variability);
-			if (indexUse)
-				indexUse->variability = def->variability;
-
-			_setRawAutoConstant(def->physicalIndex, acType, extraInfo, def->variability, def->elementSize);
-		}
-
-	}
-	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setConstantFromTime(size_t index, float factor)
-	{
-		setAutoConstantReal(index, ACT_TIME, factor);
-	}
-	//---------------------------------------------------------------------------
-	void GpuProgramParameters::setNamedConstantFromTime(const String& name, float factor)
-	{
-		setNamedAutoConstantReal(name, ACT_TIME, factor);
-	}
-	//---------------------------------------------------------------------------
-	GpuProgramParameters::AutoConstantEntry* GpuProgramParameters::getAutoConstantEntry(const size_t index)
-	{
-		if (index < mAutoConstants.size())
-		{
-			return &(mAutoConstants[index]);
-		}
-		else
-		{
-			return NULL;
-		}
-	}
-	//---------------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantEntry* 
-		GpuProgramParameters::findFloatAutoConstantEntry(size_t logicalIndex)
-	{
-		if (mFloatLogicalToPhysical == nullptr)
-		{
-			CM_EXCEPT(InvalidParametersException, 
-			"This is not a low-level parameter parameter object");
-		}
-
-		return _findRawAutoConstantEntryFloat(
-			_getFloatConstantPhysicalIndex(logicalIndex, 0, GPV_GLOBAL));
-
-	}
-	//---------------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantEntry* 
-		GpuProgramParameters::findIntAutoConstantEntry(size_t logicalIndex)
-	{
-		if (mIntLogicalToPhysical == nullptr)
-		{
-			CM_EXCEPT(InvalidParametersException, 
-			"This is not a low-level parameter parameter object");
-		}
-
-		return _findRawAutoConstantEntryInt(
-			_getIntConstantPhysicalIndex(logicalIndex, 0, GPV_GLOBAL));
-
-
-	}
-	//---------------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantEntry* 
-		GpuProgramParameters::findAutoConstantEntry(const String& paramName)
-	{
-		if (mNamedConstants == nullptr)
-		{
-			CM_EXCEPT(InvalidParametersException, 
-			"This params object is not based on a program with named parameters.");
-		}
-
-		const GpuConstantDefinition& def = getConstantDefinition(paramName);
-		if (def.isFloat())
-		{
-			return _findRawAutoConstantEntryFloat(def.physicalIndex);
-		}
-		else
-		{
-			return _findRawAutoConstantEntryInt(def.physicalIndex);
-		}
-	}
-	//---------------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantEntry* 
-		GpuProgramParameters::_findRawAutoConstantEntryFloat(size_t physicalIndex)
-	{
-		for(AutoConstantList::iterator i = mAutoConstants.begin();
-			i != mAutoConstants.end(); ++i)
-		{
-			AutoConstantEntry& ac = *i;
-			// should check that auto is float and not int so that physicalIndex
-			// doesn't have any ambiguity
-			// However, all autos are float I think so no need
-			if (ac.physicalIndex == physicalIndex)
-				return &ac;
-		}
-
-		return 0;
-
-	}
-	//---------------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantEntry* 
-		GpuProgramParameters::_findRawAutoConstantEntryInt(size_t physicalIndex)
-	{
-		// No autos are float?
-		return 0;
-	}
-	//---------------------------------------------------------------------------
 	void GpuProgramParameters::copyConstantsFrom(const GpuProgramParameters& source)
 	{
 		// Pull buffers & auto constant list over directly
 		mFloatConstants = source.getFloatConstantList();
 		mIntConstants = source.getIntConstantList();
-		mAutoConstants = source.getAutoConstantList();
 		mCombinedVariability = source.mCombinedVariability;
 		copySharedParamSetUsage(source.mSharedParamSets);
 	}
@@ -1790,26 +1160,6 @@ namespace CamelotEngine
 				}
 			}
 
-			for (AutoConstantList::const_iterator i = source.mAutoConstants.begin(); 
-				i != source.mAutoConstants.end(); ++i)
-			{
-				const GpuProgramParameters::AutoConstantEntry& autoEntry = *i;
-				// find dest physical index
-				std::map<size_t, String>::iterator mi = srcToDestNamedMap.find(autoEntry.physicalIndex);
-				if (mi != srcToDestNamedMap.end())
-				{
-					if (autoEntry.fData)
-					{
-						setNamedAutoConstantReal(mi->second, autoEntry.paramType, autoEntry.fData);
-					}
-					else
-					{
-						setNamedAutoConstant(mi->second, autoEntry.paramType, autoEntry.data);
-					}
-				}
-
-			}
-
 			// Copy shared param sets
 			for (GpuSharedParamUsageList::const_iterator i = source.mSharedParamSets.begin();
 				i != source.mSharedParamSets.end(); ++i)
@@ -1822,50 +1172,6 @@ namespace CamelotEngine
 			}
 		}
 	}
-	//-----------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantDefinition* 
-		GpuProgramParameters::getAutoConstantDefinition(const String& name)
-	{
-		// find a constant definition that matches name by iterating through the 
-		// constant definition array
-		bool nameFound = false;
-		size_t i = 0;
-		const size_t numDefs = getNumAutoConstantDefinitions();
-		while (!nameFound && (i < numDefs))
-		{
-			if (name == AutoConstantDictionary[i].name) 
-				nameFound = true;
-			else
-				++i;
-		}
-
-		if (nameFound)
-			return &AutoConstantDictionary[i];
-		else
-			return 0;
-	}
-
-	//-----------------------------------------------------------------------
-	const GpuProgramParameters::AutoConstantDefinition* 
-		GpuProgramParameters::getAutoConstantDefinition(const size_t idx) 
-	{
-
-		if (idx < getNumAutoConstantDefinitions())
-		{
-			// verify index is equal to acType
-			// if they are not equal then the dictionary was not setup properly
-			assert(idx == static_cast<size_t>(AutoConstantDictionary[idx].acType));
-			return &AutoConstantDictionary[idx];
-		}
-		else
-			return 0;
-	}
-	//-----------------------------------------------------------------------
-	size_t GpuProgramParameters::getNumAutoConstantDefinitions(void)
-	{
-		return sizeof(AutoConstantDictionary)/sizeof(AutoConstantDefinition);
-	}
-
 	//-----------------------------------------------------------------------
 	void GpuProgramParameters::incPassIterationNumber(void)
 	{