Skip to content

Commit

Permalink
RenderPassRenderActions is renamed to RenderPassForward (#5890)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky authored Dec 11, 2023
1 parent 0597df4 commit 96779e6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/src/examples/graphics/render-pass.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
const uiLayer = app.scene.layers.getLayerById(pc.LAYERID_UI);

// use the render pass to render the world and ui layers to the created texture
const renderPass = new pc.RenderPassRenderActions(app.graphicsDevice, app.scene.layers, app.scene, app.renderer);
const renderPass = new pc.RenderPassForward(app.graphicsDevice, app.scene.layers, app.scene, app.renderer);

// this render pass resizes the texture to match the size of are on the scene we render to
renderPass.init(rt, {
Expand Down
8 changes: 4 additions & 4 deletions extras/render-passes/render-pass-camera-frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
FILTER_LINEAR,
RenderPass,
RenderPassColorGrab,
RenderPassRenderActions,
RenderPassForward,
RenderTarget,
Texture
} from "playcanvas";
Expand Down Expand Up @@ -118,7 +118,7 @@ class RenderPassCameraFrame extends RenderPass {
// render pass that renders the scene to the render target. Render target size automatically
// matches the back-buffer size with the optional scale. Note that the scale parameters
// allow us to render the 3d scene at lower resolution, improving performance.
this.scenePass = new RenderPassRenderActions(device, composition, scene, renderer);
this.scenePass = new RenderPassForward(device, composition, scene, renderer);
this.scenePass.init(rt, {
resizeSource: targetRenderTarget,
scaleX: this.renderTargetScale,
Expand All @@ -143,7 +143,7 @@ class RenderPassCameraFrame extends RenderPass {
colorGrabPass.source = rt;

// if grab pass is used, render the layers after it (otherwise they were already rendered)
scenePassTransparent = new RenderPassRenderActions(device, composition, scene, renderer);
scenePassTransparent = new RenderPassForward(device, composition, scene, renderer);
scenePassTransparent.init(rt);
lastAddedIndex = scenePassTransparent.addLayers(composition, cameraComponent, lastAddedIndex, clearRenderTarget, options.lastSceneLayerId, options.lastSceneLayerIsTransparent);
}
Expand All @@ -166,7 +166,7 @@ class RenderPassCameraFrame extends RenderPass {
// ------ AFTER COMPOSITION RENDERING ------

// final pass renders directly to the target renderTarget on top of the bloomed scene, and it renders a transparent UI layer
const afterPass = new RenderPassRenderActions(device, composition, scene, renderer);
const afterPass = new RenderPassForward(device, composition, scene, renderer);
afterPass.init(targetRenderTarget);

// add all remaining layers the camera renders
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export { shFromCubemap } from './scene/graphics/prefilter-cubemap.js';
export { reprojectTexture } from './scene/graphics/reproject-texture.js';

// SCENE / RENDERER
export { RenderPassRenderActions } from './scene/renderer/render-pass-render-actions.js';
export { RenderPassForward } from './scene/renderer/render-pass-forward.js';

// SCENE / SHADER-LIB
export { createShader, createShaderFromCode } from './scene/shader-lib/utils.js';
Expand Down
4 changes: 2 additions & 2 deletions src/scene/renderer/forward-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import { Renderer } from './renderer.js';
import { LightCamera } from './light-camera.js';
import { RenderPassRenderActions } from './render-pass-render-actions.js';
import { RenderPassForward } from './render-pass-forward.js';
import { RenderPassPostprocessing } from './render-pass-postprocessing.js';

const _drawCallList = {
Expand Down Expand Up @@ -830,7 +830,7 @@ class ForwardRenderer extends Renderer {
*/
addMainRenderPass(frameGraph, layerComposition, renderTarget, startIndex, endIndex) {

const renderPass = new RenderPassRenderActions(this.device, layerComposition, this.scene, this);
const renderPass = new RenderPassForward(this.device, layerComposition, this.scene, this);
renderPass.init(renderTarget);

const renderActions = layerComposition._renderActions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import { RenderAction } from "../composition/render-action.js";
import { WorldClustersDebug } from "../lighting/world-clusters-debug.js";

/**
* A render pass used to render Render Actions (layers).
* A render pass used render a set of layers using a camera.
*
* @ignore
*/
class RenderPassRenderActions extends RenderPass {
class RenderPassForward extends RenderPass {
/**
* @type {import('../composition/layer-composition.js').LayerComposition}
*/
Expand Down Expand Up @@ -378,4 +378,4 @@ class RenderPassRenderActions extends RenderPass {
// #endif
}

export { RenderPassRenderActions };
export { RenderPassForward };

0 comments on commit 96779e6

Please sign in to comment.