|
@@ -410,14 +410,14 @@ vPositionUVW=positionUpdated;\n\
|
|
#include<instancesVertex>\n\
|
|
#include<instancesVertex>\n\
|
|
#include<bonesVertex>\n\
|
|
#include<bonesVertex>\n\
|
|
\n\
|
|
\n\
|
|
-#[Vertex_Befor_PositionUpdated]\n\
|
|
|
|
|
|
+#[Vertex_Before_PositionUpdated]\n\
|
|
\n\
|
|
\n\
|
|
gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n\
|
|
gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0);\n\
|
|
vec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n\
|
|
vec4 worldPos=finalWorld*vec4(positionUpdated,1.0);\n\
|
|
vPositionW=vec3(worldPos);\n\
|
|
vPositionW=vec3(worldPos);\n\
|
|
#ifdef NORMAL\n\
|
|
#ifdef NORMAL\n\
|
|
\n\
|
|
\n\
|
|
-#[Vertex_Befor_NormalUpdated]\n\
|
|
|
|
|
|
+#[Vertex_Before_NormalUpdated]\n\
|
|
\n\
|
|
\n\
|
|
vNormalW=normalize(vec3(finalWorld*vec4(normalUpdated,0.0)));\n\
|
|
vNormalW=normalize(vec3(finalWorld*vec4(normalUpdated,0.0)));\n\
|
|
#endif\n\
|
|
#endif\n\
|
|
@@ -583,8 +583,8 @@ vColor=color;\n\
|
|
.replace('#[Vertex_Begin]', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : ""))
|
|
.replace('#[Vertex_Begin]', (this.CustomParts.Vertex_Begin ? this.CustomParts.Vertex_Begin : ""))
|
|
.replace('#[Vertex_Definations]', (this._customUnifrom ? this._customUnifrom.join("\n") : "") + (this.CustomParts.Vertex_Definations ? this.CustomParts.Vertex_Definations : ""))
|
|
.replace('#[Vertex_Definations]', (this._customUnifrom ? this._customUnifrom.join("\n") : "") + (this.CustomParts.Vertex_Definations ? this.CustomParts.Vertex_Definations : ""))
|
|
.replace('#[Vertex_MainBegin]', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : ""))
|
|
.replace('#[Vertex_MainBegin]', (this.CustomParts.Vertex_MainBegin ? this.CustomParts.Vertex_MainBegin : ""))
|
|
- .replace('#[Vertex_Befor_PositionUpdated]', (this.CustomParts.Vertex_Befor_PositionUpdated ? this.CustomParts.Vertex_Befor_PositionUpdated : ""))
|
|
|
|
- .replace('#[Vertex_Befor_NormalUpdated]', (this.CustomParts.Vertex_Befor_NormalUpdated ? this.CustomParts.Vertex_Befor_NormalUpdated : ""));
|
|
|
|
|
|
+ .replace('#[Vertex_Before_PositionUpdated]', (this.CustomParts.Vertex_Before_PositionUpdated ? this.CustomParts.Vertex_Before_PositionUpdated : ""))
|
|
|
|
+ .replace('#[Vertex_Before_NormalUpdated]', (this.CustomParts.Vertex_Before_NormalUpdated ? this.CustomParts.Vertex_Before_NormalUpdated : ""));
|
|
BABYLON.Effect.ShadersStore[name + "PixelShader"] = this.ShaderVersion.FragmentStore
|
|
BABYLON.Effect.ShadersStore[name + "PixelShader"] = this.ShaderVersion.FragmentStore
|
|
.replace('#[Fragment_Begin]', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : ""))
|
|
.replace('#[Fragment_Begin]', (this.CustomParts.Fragment_Begin ? this.CustomParts.Fragment_Begin : ""))
|
|
.replace('#[Fragment_MainBegin]', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : ""))
|
|
.replace('#[Fragment_MainBegin]', (this.CustomParts.Fragment_MainBegin ? this.CustomParts.Fragment_MainBegin : ""))
|
|
@@ -656,12 +656,12 @@ vColor=color;\n\
|
|
this.CustomParts.Vertex_MainBegin = shaderPart;
|
|
this.CustomParts.Vertex_MainBegin = shaderPart;
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
- CustomMaterial.prototype.Vertex_Befor_PositionUpdated = function (shaderPart) {
|
|
|
|
- this.CustomParts.Vertex_Befor_PositionUpdated = shaderPart.replace("result", "positionUpdated");
|
|
|
|
|
|
+ CustomMaterial.prototype.Vertex_Before_PositionUpdated = function (shaderPart) {
|
|
|
|
+ this.CustomParts.Vertex_Before_PositionUpdated = shaderPart.replace("result", "positionUpdated");
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
- CustomMaterial.prototype.Vertex_Befor_NormalUpdated = function (shaderPart) {
|
|
|
|
- this.CustomParts.Vertex_Befor_NormalUpdated = shaderPart.replace("result", "normalUpdated");
|
|
|
|
|
|
+ CustomMaterial.prototype.Vertex_Before_NormalUpdated = function (shaderPart) {
|
|
|
|
+ this.CustomParts.Vertex_Before_NormalUpdated = shaderPart.replace("result", "normalUpdated");
|
|
return this;
|
|
return this;
|
|
};
|
|
};
|
|
return CustomMaterial;
|
|
return CustomMaterial;
|