提交 c705dfc8 编写于 作者: M Mr.doob

ShaderChunk: Moved normal_flip out of envmap_fragment and normal_fragment. See...

ShaderChunk: Moved normal_flip out of envmap_fragment and normal_fragment. See fc1159a6.
上级 7463e48c
......@@ -3864,6 +3864,7 @@ THREE.ShaderLib[ 'mmd' ] = {
THREE.ShaderChunk[ "alphamap_fragment" ],
THREE.ShaderChunk[ "alphatest_fragment" ],
THREE.ShaderChunk[ "specularmap_fragment" ],
THREE.ShaderChunk[ "normal_flip" ],
THREE.ShaderChunk[ "normal_fragment" ],
THREE.ShaderChunk[ "emissivemap_fragment" ],
......
......@@ -153,6 +153,7 @@ THREE.PhongNode.prototype.build = function( builder ) {
var output = [
// prevent undeclared normal
THREE.ShaderChunk[ "normal_flip" ],
THREE.ShaderChunk[ "normal_fragment" ],
// prevent undeclared material
......
......@@ -169,6 +169,7 @@ THREE.StandardNode.prototype.build = function( builder ) {
var output = [
// prevent undeclared normal
THREE.ShaderChunk[ "normal_flip" ],
THREE.ShaderChunk[ "normal_fragment" ],
// prevent undeclared material
......
......@@ -23,8 +23,6 @@
#endif
#include <normal_flip>
#ifdef ENVMAP_TYPE_CUBE
vec4 envColor = textureCube( envMap, flipNormal * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
......
......@@ -8,8 +8,6 @@
#else
#include <normal_flip>
vec3 normal = normalize( vNormal ) * flipNormal;
#endif
......
......@@ -43,6 +43,7 @@ void main() {
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include <normal_flip>
#include <envmap_fragment>
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
......
......@@ -70,6 +70,7 @@ void main() {
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <normal_flip>
#include <envmap_fragment>
gl_FragColor = vec4( outgoingLight, diffuseColor.a );
......
......@@ -42,6 +42,7 @@ void main() {
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <specularmap_fragment>
#include <normal_flip>
#include <normal_fragment>
#include <emissivemap_fragment>
......
......@@ -61,6 +61,7 @@ void main() {
#include <specularmap_fragment>
#include <roughnessmap_fragment>
#include <metalnessmap_fragment>
#include <normal_flip>
#include <normal_fragment>
#include <emissivemap_fragment>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册