Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/renderers/common/XRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,7 @@ class XRManager extends EventDispatcher {
* @param {Function} rendercall - A callback function that renders the layer. Similar to code in
* the default animation loop, this method can be used to update/transform 3D object in the layer's scene.
* @param {Object} [attributes={}] - Allows to configure the layer's render target.
* @param {number} [attributes.samples] - The scene MSAA sample count. Defaults to the renderer's sample count.
* @return {Mesh} A mesh representing the quadratic XR layer. This mesh should be added to the XR scene.
*/
createQuadLayer( width, height, translation, quaternion, pixelwidth, pixelheight, rendercall, attributes = {} ) {
Expand All @@ -952,8 +953,10 @@ class XRManager extends EventDispatcher {
attributes.stencil ? DepthStencilFormat : DepthFormat
),
stencilBuffer: attributes.stencil,
samples: attributes.samples ?? this._renderer.samples,
resolveDepthBuffer: false,
resolveStencilBuffer: false,
storeMultisampledColorBuffer: false,
storeMultisampledDepthBuffer: false,
storeMultisampledStencilBuffer: false
} );
Expand All @@ -974,6 +977,7 @@ class XRManager extends EventDispatcher {
quaternion: quaternion,
pixelwidth: pixelwidth,
pixelheight: pixelheight,
samples: renderTarget.samples,
plane: plane,
material: material,
rendercall: rendercall,
Expand Down Expand Up @@ -1019,6 +1023,7 @@ class XRManager extends EventDispatcher {
* @param {Function} rendercall - A callback function that renders the layer. Similar to code in
* the default animation loop, this method can be used to update/transform 3D object in the layer's scene.
* @param {Object} [attributes={}] - Allows to configure the layer's render target.
* @param {number} [attributes.samples] - The scene MSAA sample count. Defaults to the renderer's sample count.
* @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene.
*/
createCylinderLayer( radius, centralAngle, aspectratio, translation, quaternion, pixelwidth, pixelheight, rendercall, attributes = {} ) {
Expand All @@ -1043,8 +1048,10 @@ class XRManager extends EventDispatcher {
attributes.stencil ? DepthStencilFormat : DepthFormat
),
stencilBuffer: attributes.stencil,
samples: attributes.samples ?? this._renderer.samples,
resolveDepthBuffer: false,
resolveStencilBuffer: false,
storeMultisampledColorBuffer: false,
storeMultisampledDepthBuffer: false,
storeMultisampledStencilBuffer: false
} );
Expand All @@ -1066,6 +1073,7 @@ class XRManager extends EventDispatcher {
quaternion: quaternion,
pixelwidth: pixelwidth,
pixelheight: pixelheight,
samples: renderTarget.samples,
plane: plane,
material: material,
rendercall: rendercall,
Expand Down Expand Up @@ -1720,8 +1728,10 @@ function onSessionEnd() {
layer.stencilBuffer ? DepthStencilFormat : DepthFormat
),
stencilBuffer: layer.stencilBuffer,
samples: layer.samples,
resolveDepthBuffer: false,
resolveStencilBuffer: false,
storeMultisampledColorBuffer: false,
storeMultisampledDepthBuffer: false,
storeMultisampledStencilBuffer: false
} );
Expand Down