Fixed Mesh Renderer to work with PostFX

This commit is contained in:
Richard Davey 2023-03-20 17:00:30 +00:00
parent ae83886729
commit 392640fe93

View file

@ -36,6 +36,9 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
// This causes a flush if the Mesh has a Post Pipeline
renderer.pipelines.preBatch(src);
var textureUnit = pipeline.setGameObject(src);
var F32 = pipeline.vertexViewF32;
@ -63,13 +66,6 @@ var MeshWebGLRenderer = function (renderer, src, camera, parentMatrix)
var totalFacesRendered = 0;
renderer.pipelines.preBatch(src);
if (!pipeline.currentBatch)
{
textureUnit = pipeline.setGameObject(src);
}
for (var i = 0; i < totalFaces; i++)
{
var face = faces[i];