@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 +5 -2
- package/dist/main.js.map +1 -1
- package/dist/module.js +5 -2
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/module.js
CHANGED
|
@@ -8842,6 +8842,7 @@ BatchUtils._disableBatchTag = ShaderTagKey.getByName("spriteDisableBatching");
|
|
|
8842
8842
|
var blitMaterial = material || basicResources.blitMaterial;
|
|
8843
8843
|
var rhi = engine._hardwareRenderer;
|
|
8844
8844
|
var context = engine._renderContext;
|
|
8845
|
+
var camera = context.camera;
|
|
8845
8846
|
// We not use projection matrix when blit, but we must modify flipProjection to make front face correct
|
|
8846
8847
|
context.flipProjection = !!destination;
|
|
8847
8848
|
rhi.activeRenderTarget(destination, viewport, context.flipProjection, 0);
|
|
@@ -8853,10 +8854,12 @@ BatchUtils._disableBatchTag = ShaderTagKey.getByName("spriteDisableBatching");
|
|
|
8853
8854
|
rendererShaderData.setVector4(Blitter._sourceScaleOffsetProperty, sourceScaleOffset != null ? sourceScaleOffset : Blitter._defaultScaleOffset);
|
|
8854
8855
|
var pass = blitMaterial.shader.subShaders[0].passes[passIndex];
|
|
8855
8856
|
var compileMacros = Shader._compileMacros;
|
|
8856
|
-
ShaderMacroCollection.unionCollection(
|
|
8857
|
+
ShaderMacroCollection.unionCollection(camera._globalShaderMacro, blitMaterial.shaderData._macroCollection, compileMacros);
|
|
8857
8858
|
var program = pass._getShaderProgram(engine, compileMacros);
|
|
8858
8859
|
program.bind();
|
|
8859
8860
|
program.groupingOtherUniformBlock();
|
|
8861
|
+
program.uploadAll(program.sceneUniformBlock, camera.scene.shaderData);
|
|
8862
|
+
program.uploadAll(program.cameraUniformBlock, camera.shaderData);
|
|
8860
8863
|
program.uploadAll(program.rendererUniformBlock, rendererShaderData);
|
|
8861
8864
|
program.uploadAll(program.materialUniformBlock, blitMaterial.shaderData);
|
|
8862
8865
|
program.uploadUnGroupTextures();
|
|
@@ -24438,7 +24441,7 @@ var blinnPhongVs = "#define GLSLIFY 1\n#include <common>\n#include <common_vert>
|
|
|
24438
24441
|
|
|
24439
24442
|
var depthOnlyFs = "#define GLSLIFY 1\nvoid main() {\n}"; // eslint-disable-line
|
|
24440
24443
|
|
|
24441
|
-
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
|
|
24444
|
+
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
|
|
24442
24445
|
|
|
24443
24446
|
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
|
|
24444
24447
|
|