浏览代码

Rename BlendAdd -> AlphaAdd

trethaller 7 年之前
父节点
当前提交
cb57fa7d4c
共有 4 个文件被更改,包括 7 次插入7 次删除
  1. 1 1
      h2d/BlendMode.hx
  2. 1 1
      h3d/mat/Material.hx
  3. 1 1
      h3d/mat/Pass.hx
  4. 4 4
      h3d/mat/PbrMaterial.hx

+ 1 - 1
h2d/BlendMode.hx

@@ -4,7 +4,7 @@ enum BlendMode {
 	None;
 	Alpha;
 	Add;
-	BlendAdd;
+	AlphaAdd;
 	SoftAdd;
 	Multiply;
 	Erase;

+ 1 - 1
h3d/mat/Material.hx

@@ -131,7 +131,7 @@ class Material extends BaseMaterial {
 			case Alpha:
 				mainPass.depthWrite = true;
 				mainPass.setPassName("alpha");
-			case Add, BlendAdd, SoftAdd, Multiply, Erase, Screen:
+			case Add, AlphaAdd, SoftAdd, Multiply, Erase, Screen:
 				mainPass.depthWrite = false;
 				mainPass.setPassName("additive");
 			}

+ 1 - 1
h3d/mat/Pass.hx

@@ -86,7 +86,7 @@ class Pass implements hxd.impl.Serializable {
 			blend(SrcAlpha, OneMinusSrcAlpha);
 		case Add:
 			blend(SrcAlpha, One);
-		case BlendAdd:
+		case AlphaAdd:
 			blend(One, OneMinusSrcAlpha);
 		case SoftAdd:
 			blend(OneMinusDstColor, One);

+ 4 - 4
h3d/mat/PbrMaterial.hx

@@ -10,7 +10,7 @@ package h3d.mat;
 	var None = "None";
 	var Alpha = "Alpha";
 	var Add = "Add";
-	var BlendAdd = "BlendAdd";
+	var AlphaAdd = "AlphaAdd";
 }
 
 typedef PbrProps = {
@@ -93,8 +93,8 @@ class PbrMaterial extends Material {
 		case Add:
 			mainPass.setBlendMode(Add);
 			mainPass.depthWrite = false;
-		case BlendAdd:
-			mainPass.setBlendMode(BlendAdd);
+		case AlphaAdd:
+			mainPass.setBlendMode(AlphaAdd);
 			mainPass.depthWrite = false;
 		}
 		var tshader = textureShader;
@@ -154,7 +154,7 @@ class PbrMaterial extends Material {
 						<option value="None">None</option>
 						<option value="Alpha">Alpha</option>
 						<option value="Add">Add</option>
-						<option value="BlendAdd">BlendAdd</option>
+						<option value="AlphaAdd">AlphaAdd</option>
 					</select>
 				</dd>
 				<dt>Shadows</dt><dd><input type="checkbox" field="shadows"/></dd>