@onerjs/core 8.32.5 → 8.32.6
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.
|
@@ -686,13 +686,25 @@ export class ShaderMaterial extends PushMaterial {
|
|
|
686
686
|
uniforms.push("logarithmicDepthConstant");
|
|
687
687
|
}
|
|
688
688
|
}
|
|
689
|
+
const renderingMesh = subMesh ? subMesh.getRenderingMesh() : mesh;
|
|
690
|
+
if (renderingMesh && this.useVertexPulling) {
|
|
691
|
+
// Add vertex buffer metadata defines for proper stride/offset handling
|
|
692
|
+
const geometry = renderingMesh.geometry;
|
|
693
|
+
if (geometry) {
|
|
694
|
+
this._vertexPullingMetadata = PrepareVertexPullingUniforms(geometry);
|
|
695
|
+
if (this._vertexPullingMetadata) {
|
|
696
|
+
for (const [attribute] of this._vertexPullingMetadata.entries()) {
|
|
697
|
+
uniforms.push(`vp_${attribute}_info`);
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
689
702
|
if (this.customShaderNameResolve) {
|
|
690
703
|
uniforms = uniforms.slice();
|
|
691
704
|
uniformBuffers = uniformBuffers.slice();
|
|
692
705
|
samplers = samplers.slice();
|
|
693
706
|
shaderName = this.customShaderNameResolve(this.name, uniforms, uniformBuffers, samplers, defines, attribs);
|
|
694
707
|
}
|
|
695
|
-
const renderingMesh = subMesh ? subMesh.getRenderingMesh() : mesh;
|
|
696
708
|
if (renderingMesh && this.useVertexPulling) {
|
|
697
709
|
defines.push("#define USE_VERTEX_PULLING");
|
|
698
710
|
const indexBuffer = renderingMesh.geometry?.getIndexBuffer();
|