Skip to content

Conversation

CodyJasonBennett
Copy link
Contributor

Related issue: #30809 (comment)

Description

Updates the example to configure a basic post-processing chain with a floating-point depth buffer (canvas default is integer, which doesn't work as well). The simplest form is what I had initially contributed with a single offscreen render + blit, but this is unusual for an example and will mess up tonemapping in real scenes since r155. This should now be a better showcase and realistic example.

@Mugen87 Mugen87 added this to the r176 milestone Apr 16, 2025
@Mugen87 Mugen87 merged commit 09826c0 into mrdoob:dev Apr 16, 2025
11 checks passed
@CodyJasonBennett CodyJasonBennett deleted the examples/reverse-depth branch April 16, 2025 23:30
const meshes = [];

const renderTarget = new THREE.WebGLRenderTarget();
renderTarget.type = THREE.UnsignedByteType;
Copy link
Contributor

@Methuselah96 Methuselah96 Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any pointers to what setting the type property does? I don't see it documented for WebGLRenderTarget and was wondering whether it needs to be added to the TypeScript types.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should be:

renderTarget.texture.type

But since the default is already THREE.UnsignedByteType we probably can just delete this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bad habit of mine. I will remove the line #30989.

RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants