资源简介

shaderforge是一款基于编写材质shader来实现一些效果、特效的插件。很久之前已经停止更新了,他是开源的,但是源代码对unity2018版本的支持不是太好,如果大家想要修改源代码来创建自己的一些自定义节点、属性等等,并且开发版本是unity2018及以下版本,使用这个插件和源代码是个不错的选择

资源截图

代码片段和文件信息

using UnityEngine;
using UnityEditor;
using System.Collections;

namespace ShaderForge {


public enum DepthTestStencil { Less Greater LEqual GEqual Equal NotEqual Always Never };
public enum StencilOp { Keep Zero Replace Invert IncrSat DecrSat IncrWrap DecrWrap };
public enum DepthTest { Less Greater LEqual GEqual Equal NotEqual Always };
public enum RenderType { None Opaque Transparent TransparentCutout Background Overlay TreeOpaque TreeTransparentCutout TreeBillboard Grass GrassBillboard };
public enum BlendModePreset {
Opaque
AlphaBlended
AlphaBlendedPremultiplied
Additive
Screen
Multiplicative
Custom
};
public enum ShaderFogMode{ Global Linear Exp Exp2 };
public enum BlendMode { One Zero SrcColor SrcAlpha DstColor DstAlpha OneMinusSrcColor OneMinusSrcAlpha OneMinusDstColor OneMinusDstAlpha };
public enum Queue { Background Geometry AlphaTest Transparent Overlay };

public enum Dithering { Off Dither2x2 Dither3x3 Dither4x4 };


[System.Serializable]
public class SFPSC_Blending : SFPS_Category {

public static string[] strDepthTestStencil = new string[] { “<“ “>“ “\u2264“ “\u2265“ “=“ “\u2260“ “Always (Default)“ “Never“ };
public static string[] strStencilOp = new string[] { “Keep (Default)“ “Zero“ “Replace“ “Invert“ “Increase (Clamped)“ “Decrease (Clamped)“ “Increase (Wrapped)“ “Decrease (Wrapped)“ };
public static string[] strDepthTest = new string[] { “<“ “>“ “\u2264 (Default)“ “\u2265“ “=“ “\u2260“ “Always“ };
public static int[] queueNumbers = new int[] { 1000 2000 2450 3000 4000 };
public static string[] strQueue = new string[] { “Background (1000)“ “Opaque Geometry (2000)“ “Alpha Clip (2450)“ “Transparent (3000)“ “Overlay (4000)“ };
public static string[] strDithering = new string[] { “Off“ “2x2 matrix“ “3x3 matrix“ “4x4 matrix“ };

public static string[] strBlendModePreset = new string[] {
“Opaque“
“Alpha Blended“
“Alpha Blended (Premultiplied)“
“Additive“
“Screen“
“Multiplicative“
““
};


// Vars

public BlendModePreset blendModePreset = BlendModePreset.Opaque;
public BlendMode blendSrc = BlendMode.One;
public BlendMode blendDst = BlendMode.Zero;
public DepthTest depthTest = DepthTest.LEqual;


public byte stencilValue = 128;
public byte stencilMaskRead = 255;
public byte stencilMaskWrite = 255;
public DepthTestStencil stencilComparison = DepthTestStencil.Always;
public StencilOp stencilPass = StencilOp.Keep;
public StencilOp stencilFail = StencilOp.Keep;
public StencilOp stencilFailZ = StencilOp.Keep;

public int offsetFactor = 0;
public int offsetUnits = 0;

// colorMask is a bitmask
// 0 = ____
// 1 = ___A
// 2 = __B_
// 3 = __BA
// 4 = _G__
// 5 = _G_A
// 6 = _GB_
// 7 = _GBA
// 8 = R___
// 9 = R__A
// 10 = R_B_
// 11 = R_BA
// 12 = RG__
// 13 = RG_A
// 14 = RGB_
// 15 = RGBA
public int colorMask = 15;

publ

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-09-07 13:13  ShaderForge_2018-master\
     文件         281  2018-09-07 13:13  ShaderForge_2018-master\README.md
     文件         158  2018-09-07 13:13  ShaderForge_2018-master\README.md.meta
     文件         172  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge.meta
     目录           0  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\
     文件         172  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor.meta
     目录           0  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\
     文件         191  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code.meta
     目录           0  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\
     文件       27943  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Blending.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Blending.cs.meta
     文件        2639  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Console.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Console.cs.meta
     文件        1961  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Experimental.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Experimental.cs.meta
     文件        5685  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Geometry.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Geometry.cs.meta
     文件       11249  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Lighting.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Lighting.cs.meta
     文件        9219  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_meta.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_meta.cs.meta
     文件       14449  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Properties.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPSC_Properties.cs.meta
     文件        8990  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPS_Category.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SFPS_Category.cs.meta
     文件        7068  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_Dependencies.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_Dependencies.cs.meta
     文件       66414  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_Editor.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_Editor.cs.meta
     文件       10844  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_EditorNodeBrowser.cs
     文件         178  2018-09-07 13:13  ShaderForge_2018-master\ShaderForge\Editor\Code\SF_EditorNodeBrowser.cs.meta
............此处省略1260个文件信息

评论

共有 条评论