ActionScript 3.0 Language and Components Reference | All Packages | All Classes | Language Elements | Index | Appendixes | Conventions | Frames No Frames |
ShaderPrecision

Package | flash.display
Class | public final class ShaderPrecision
Inheritance | ShaderPrecision Object

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

This class defines the constants that represent the possible values for the Shader class's `precisionHint` property. Each constant represents one of the precision modes for executing shader operations.

The precision mode selection affects the following shader operations. These operations are faster on an Intel processor with the SSE instruction set:

- `sin(x)`
- `cos(x)`
- `tan(x)`
- `asin(x)`
- `acos(x)`
- `atan(x)`
- `atan(x, y)`
- `exp(x)`
- `exp2(x)`
- `log(x)`
- `log2(x)`
- `pow(x, y)`
- `reciprocal(x)`
- `sqrt(x)`

See also

flash.display.Shader.precisionHint

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | prototype : Object [static] A reference to the prototype object of a class or function object. | Object

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Public Constants

| Constant | Defined By
--- | --- | ---
|  | FAST : String = "fast" [static] Represents fast precision mode. | ShaderPrecision
|  | FULL : String = "full" [static] Represents full precision mode. | ShaderPrecision

Constant Detail

FAST | Constant

`public static const FAST:String = "fast"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Represents fast precision mode.

Fast precision mode is designed for maximum performance but does not work consistently on different platforms and individual CPU configurations. In many cases, this level of precision is sufficient to create graphic effects without visible artifacts.

It is usually faster to use fast precision mode than to use lookup tables.

See also

flash.display.Shader.precisionHint

FULL | Constant |

`public static const FULL:String = "full"`

Language Version : | ActionScript 3.0

Player Version : | Flash Player 10

Represents full precision mode.

In full precision, mode the shader computes all math operations to the full width of the IEEE 32-bit floating standard. This mode provides consistent behavior on all platforms. In this mode, some math operations such as trigonometric and exponential functions can be slow.

See also

flash.display.Shader.precisionHint

Submit Feedback on LiveDocs
© 2004-2008 Adobe Systems Incorporated. All rights reserved.
Tue May 20 2008, 04:02 AM -07:00