| TextureScaler Class |
Retrieved From: https://pastebin.com/qkkhWs2J
A unility class with functions to scale Texture2D Data.
Scale is performed on the GPU using RTT, so it's blazing fast.
Setting up and Getting back the texture data is the bottleneck.
But Scaling itself costs only 1 draw call and 1 RTT State setup!
WARNING: This script override the RTT Setup! (It sets a RTT!)
Note: This scaler does NOT support aspect ratio based scaling. You will have to do it yourself!
It supports Alpha, but you will have to divide by alpha in your shaders,
because of premultiplied alpha effect. Or you should use blend modes.
Inheritance Hierarchy SystemObject Object Component Behaviour MonoBehaviour ASLTextureScaler
Namespace:
ASL
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public class TextureScaler : MonoBehaviour
Public Class TextureScaler
Inherits MonoBehaviour
public ref class TextureScaler : public MonoBehaviour
type TextureScaler =
class
inherit MonoBehaviour
end
The TextureScaler type exposes the following members.
Constructors
| Name | Description |
---|
| TextureScaler | Initializes a new instance of the TextureScaler class |
TopMethods See Also