C# Class 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.
ファイルを表示 Open project: heyx3/GPUNoiseForUnity Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
SetUpColorTex ( int width, int height ) : void

Method Details

GenerateToArray() public static method

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
return void

GenerateToTexture() public static method

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
return void