65. CLASE RENDERTEXTURE (y III)










DiscardContents:

function DiscardContents () : void


Descarta el contenido de la render texture.


SetGlobalShaderProperty:

function SetGlobalShaderProperty (propertyName : String) : void


Asigna esta render texture como la propiedad shader global llamada en el parámetro propertyName.


VARIABLES DE CLASE:

active:

static var active : RenderTexture


Se refiere a la render texture activa. Todos los renderings van dentro de la rendertexture activa. Si esta es null todo se renderiza en la ventana principal. Cuando una RenderTexture se convierte en activa su contexto de hardware de renderizado es automáticamente creado si no se había creado ya.


FUNCIONES DE CLASE:

GetTemporary:

static function GetTemporary (width : int, height : int, depthBuffer : int = 0, format : RenderTextureFormat = RenderTextureFormat.Default) : RenderTexture


Asigna una render texture temporal.

Esta función es optimizada para cuando necesitas una RenderTexture rápida para hacer algunos cálculos temporales. Libérala usando ReleaseTemporary tan pronto hayas hecho el trabajo, así podrás reusarla otra vez en una nueva llamada si la necesitas.


ReleaseTemporary:

static function ReleaseTemporary (temp : RenderTexture) : void


Libera una textura temporal asignada con GetTemporary.

POSTED BY UnityScripts
DISCUSSION 7 Comments
Con la tecnología de Blogger.