Skip to content

Commit

Permalink
Fix the order of layers in ReflectionPlanar example to render MiniSta…
Browse files Browse the repository at this point in the history
…ts last (#5642)

Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky committed Sep 18, 2023
1 parent 13a2be2 commit 42313e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/src/examples/graphics/reflection-planar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ class ReflectionPlanarExample {
return primitive;
}

// create a layer for objects that do not render into texture
const excludedLayer = new pc.Layer({ name: "Excluded" });
app.scene.layers.push(excludedLayer);

// get existing layers
const worldLayer = app.scene.layers.getLayerByName("World");
const skyboxLayer = app.scene.layers.getLayerByName("Skybox");
const uiLayer = app.scene.layers.getLayerByName("UI");

// create a layer for objects that do not render into texture
const excludedLayer = new pc.Layer({ name: "Excluded" });
app.scene.layers.insert(excludedLayer, app.scene.layers.getTransparentIndex(worldLayer) + 1);

// Create the shader from the vertex and fragment shaders
const shader = pc.createShaderFromCode(app.graphicsDevice, files['shader.vert'], files['shader.frag'], 'myShader', {
aPosition: pc.SEMANTIC_POSITION,
Expand Down

0 comments on commit 42313e2

Please sign in to comment.