@galacean/engine-core 1.4.8 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -8846,6 +8846,7 @@ BatchUtils._disableBatchTag = ShaderTagKey.getByName("spriteDisableBatching");
8846
8846
  var blitMaterial = material || basicResources.blitMaterial;
8847
8847
  var rhi = engine._hardwareRenderer;
8848
8848
  var context = engine._renderContext;
8849
+ var camera = context.camera;
8849
8850
  // We not use projection matrix when blit, but we must modify flipProjection to make front face correct
8850
8851
  context.flipProjection = !!destination;
8851
8852
  rhi.activeRenderTarget(destination, viewport, context.flipProjection, 0);
@@ -8857,10 +8858,12 @@ BatchUtils._disableBatchTag = ShaderTagKey.getByName("spriteDisableBatching");
8857
8858
  rendererShaderData.setVector4(Blitter._sourceScaleOffsetProperty, sourceScaleOffset != null ? sourceScaleOffset : Blitter._defaultScaleOffset);
8858
8859
  var pass = blitMaterial.shader.subShaders[0].passes[passIndex];
8859
8860
  var compileMacros = Shader._compileMacros;
8860
- ShaderMacroCollection.unionCollection(context.camera._globalShaderMacro, blitMaterial.shaderData._macroCollection, compileMacros);
8861
+ ShaderMacroCollection.unionCollection(camera._globalShaderMacro, blitMaterial.shaderData._macroCollection, compileMacros);
8861
8862
  var program = pass._getShaderProgram(engine, compileMacros);
8862
8863
  program.bind();
8863
8864
  program.groupingOtherUniformBlock();
8865
+ program.uploadAll(program.sceneUniformBlock, camera.scene.shaderData);
8866
+ program.uploadAll(program.cameraUniformBlock, camera.shaderData);
8864
8867
  program.uploadAll(program.rendererUniformBlock, rendererShaderData);
8865
8868
  program.uploadAll(program.materialUniformBlock, blitMaterial.shaderData);
8866
8869
  program.uploadUnGroupTextures();
@@ -24442,7 +24445,7 @@ var blinnPhongVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>
24442
24445
 
24443
24446
  var depthOnlyFs = "#define GLSLIFY 1\nvoid main() {\n}"; // eslint-disable-line
24444
24447
 
24445
- var depthOnlyVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\nuniform mat4 camera_VPMat;\n\nvoid main() {\n\n #include <begin_position_vert>\n #include <blendShape_vert>\n #include <skinning_vert>\n #include <position_vert>\n\n}\n"; // eslint-disable-line
24448
+ var depthOnlyVs = "#define GLSLIFY 1\n#define MATERIAL_OMIT_NORMAL\n#include <common>\n#include <common_vert>\n#include <blendShape_input>\nuniform mat4 camera_VPMat;\n\nvoid main() {\n\n #include <begin_position_vert>\n #include <blendShape_vert>\n #include <skinning_vert>\n #include <position_vert>\n\n}\n"; // eslint-disable-line
24446
24449
 
24447
24450
  var particleFs = "#define GLSLIFY 1\n#include <common>\n\nvarying vec4 v_Color;\nvarying vec2 v_TextureCoordinate;\nuniform sampler2D material_BaseTexture;\nuniform vec4 material_BaseColor;\n\n#ifdef RENDERER_MODE_MESH\n\tvarying vec4 v_MeshColor;\n#endif\n\nvoid main() {\n\tvec4 color = material_BaseColor * v_Color;\n\n\t#ifdef RENDERER_MODE_MESH\n\t\tcolor *= v_MeshColor;\n\t#endif\n\n\t#ifdef MATERIAL_HAS_BASETEXTURE\n\t\tvec4 textureColor = texture2D(material_BaseTexture,v_TextureCoordinate);\n\t\t#ifndef ENGINE_IS_COLORSPACE_GAMMA\n textureColor = gammaToLinear(textureColor);\n #endif\n\t\tcolor *= textureColor;\n\t#endif\n\tgl_FragColor = color; \n\n\t #ifndef ENGINE_IS_COLORSPACE_GAMMA\n gl_FragColor = linearToGamma(gl_FragColor);\n #endif\n}"; // eslint-disable-line
24448
24451