C# Класс GPUGraph.GraphUtils

Provides support for saving/loading things like Graphs and shaders. It is recommended to just use RuntimeGraph instead of using this class directly.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
GenerateToArray ( float outData, Material noiseMat ) : void

Uses the given noise material to generate noise into the given array.

GenerateToTexture ( RenderTexture rendTarget, Material noiseMat, Texture2D copyTo = null ) : void

Renders the given material into the given render target using a full-screen quad. Assumes the material uses a shader generated from a Graph. Optionally copies the resulting texture data into a Texture2D for further processing.

Приватные методы

Метод Описание
SetUpColorTex ( int width, int height ) : void

Описание методов

GenerateToArray() публичный статический Метод

Uses the given noise material to generate noise into the given array.
public static GenerateToArray ( float outData, Material noiseMat ) : void
outData float
noiseMat UnityEngine.Material
Результат void

GenerateToTexture() публичный статический Метод

Renders the given material into the given render target using a full-screen quad. Assumes the material uses a shader generated from a Graph. Optionally copies the resulting texture data into a Texture2D for further processing.
public static GenerateToTexture ( RenderTexture rendTarget, Material noiseMat, Texture2D copyTo = null ) : void
rendTarget UnityEngine.RenderTexture /// If set to "null", the noise will be rendered onto the screen. ///
noiseMat UnityEngine.Material
copyTo UnityEngine.Texture2D
Результат void