C# 클래스 GPUGraph.GraphEditorUtils

파일 보기 프로젝트 열기: heyx3/GPUNoiseForUnity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Extension string

공개 메소드들

메소드 설명
GenerateToArray ( Graph g, GraphParamCollection c, int width, int height ) : ].float[

Generates a 2D grid of noise from the given graph. If an error occurred, outputs to the Unity debug console and returns "null".

GenerateToTexture ( Graph g, GraphParamCollection c, int width, int height, Gradient gradientRamp, TextureFormat format = TextureFormat.RGBAFloat ) : Texture2D

Generates a texture containing the given graph's noise output. If this is being called very often, create a permanent render target and material and use the other version of this method instead for much better performance. If an error occurred, outputs to the Unity debug console and returns "null".

GenerateToTexture ( Graph g, GraphParamCollection c, int width, int height, string outputComponents, float defaultColor, TextureFormat format = TextureFormat.RGBAFloat ) : Texture2D

Generates a texture containing the given graph's noise output. If this is being called very often, create a permanent render target and material and use the other version of this method instead for much better performance. If an error occurred, outputs to the Unity debug console and returns "null".

GetAllGraphsInProject ( string excludeGraph = null, bool makeRelativeToAssets = false ) : List

Gets the full paths for all graphs in this Unity project.

SaveShader ( Graph g, string filePath, string shaderName, string gradientRampName ) : Shader

Saves the shader for the given graph to the given file with the given name. Also forces Unity to immediately recognize and compile the shader so that it can be immediately used after calling this function. If the shader fails to load for some reason, an error is output to the Unity console and "null" is returned.

SaveShader ( Graph g, string filePath, string shaderName, string outputComponents, float defaultColor ) : Shader

Saves the shader for the given graph to the given file with the given name. Also forces Unity to immediately recognize and compile the shader so that it can be immediately used after calling this function. If the shader fails to load for some reason, an error is output to the Unity console and "null" is returned.

메소드 상세

GenerateToArray() 공개 정적인 메소드

Generates a 2D grid of noise from the given graph. If an error occurred, outputs to the Unity debug console and returns "null".
public static GenerateToArray ( Graph g, GraphParamCollection c, int width, int height ) : ].float[
g Graph
c GraphParamCollection
width int
height int
리턴 ].float[

GenerateToTexture() 공개 정적인 메소드

Generates a texture containing the given graph's noise output. If this is being called very often, create a permanent render target and material and use the other version of this method instead for much better performance. If an error occurred, outputs to the Unity debug console and returns "null".
public static GenerateToTexture ( Graph g, GraphParamCollection c, int width, int height, Gradient gradientRamp, TextureFormat format = TextureFormat.RGBAFloat ) : Texture2D
g Graph
c GraphParamCollection
width int
height int
gradientRamp UnityEngine.Gradient
format TextureFormat
리턴 UnityEngine.Texture2D

GenerateToTexture() 공개 정적인 메소드

Generates a texture containing the given graph's noise output. If this is being called very often, create a permanent render target and material and use the other version of this method instead for much better performance. If an error occurred, outputs to the Unity debug console and returns "null".
public static GenerateToTexture ( Graph g, GraphParamCollection c, int width, int height, string outputComponents, float defaultColor, TextureFormat format = TextureFormat.RGBAFloat ) : Texture2D
g Graph
c GraphParamCollection
width int
height int
outputComponents string /// The texture output. /// For example, pass "rgb" or "xyz" to output the noise into the red, green, and blue channels /// but not the alpha channel. ///
defaultColor float /// The color (generally 0-1) of the color components which aren't set by the noise. ///
format TextureFormat
리턴 UnityEngine.Texture2D

GetAllGraphsInProject() 공개 정적인 메소드

Gets the full paths for all graphs in this Unity project.
public static GetAllGraphsInProject ( string excludeGraph = null, bool makeRelativeToAssets = false ) : List
excludeGraph string
makeRelativeToAssets bool
리턴 List

SaveShader() 공개 정적인 메소드

Saves the shader for the given graph to the given file with the given name. Also forces Unity to immediately recognize and compile the shader so that it can be immediately used after calling this function. If the shader fails to load for some reason, an error is output to the Unity console and "null" is returned.
public static SaveShader ( Graph g, string filePath, string shaderName, string gradientRampName ) : Shader
g Graph
filePath string
shaderName string
gradientRampName string The name of the gradient ramp texture param.
리턴 UnityEngine.Shader

SaveShader() 공개 정적인 메소드

Saves the shader for the given graph to the given file with the given name. Also forces Unity to immediately recognize and compile the shader so that it can be immediately used after calling this function. If the shader fails to load for some reason, an error is output to the Unity console and "null" is returned.
public static SaveShader ( Graph g, string filePath, string shaderName, string outputComponents, float defaultColor ) : Shader
g Graph
filePath string
shaderName string
outputComponents string /// The texture output. /// For example, pass "rgb" or "xyz" to output the noise into the red, green, and blue channels /// but not the alpha channel. ///
defaultColor float /// The color (generally 0-1) of the color components which aren't set by the noise. ///
리턴 UnityEngine.Shader

프로퍼티 상세

Extension 공개적으로 정적으로 프로퍼티

The standard file extension for Graphs.
public static string Extension
리턴 string