Skip to content

r175 breaks custom shadow because RenderTarget changed to multisampled #30895

@Spiri0

Description

@Spiri0

Description

I created a live example using r174. As soon as I switch to r175, it breaks because in r175 the RenderTarget suddenly sets to multisampled. Even if I set samples in RenderTarget to 1 it doesn't work.
I think the RenderTarget would benefit from a parameter that lets you set it to multisampled or non-multisampled.

I created my own light source, as simple as possible, from lines 221 to 328. In it, I switch between a placeholder depth texture and the scene depth texture. This has the advantage that the shader is initialized from the beginning and I avoid the frame delay that occurs when using threejs light sources if I want to use the shadow map from them for my own shader.

Reproduction steps

I think simply using my working codePen / jsfiddle with r174 and looking at the small, quick-to-understand light source from 221-328 is easier to understand than a long to-do description. 242 to 273 are the interesting parts.
I installed the samplerComparison into my r174. It works fine.

Simply switch from r174 to r175 and in the console you can see that the RenderTarget suddenly delivers a multisampled texture. If I can use multisampled depth textures for the placeholder and the scene depth texture, that would also be a possibility. The important thing is that both have the same nature so that they remain interchangeable at the shader uniform.

P.S. I tried to incorporate a few PRs into r174 that were incorporated into r175. Unfortunately, I don't recognize any PR that could be the cause of the issue. It has to be one of the PRs.

Code

look at live example

Live example

https://codepen.io/Spiri0/pen/ByaeZJV?editors=0010
https://jsfiddle.net/Spiri/k7e8trzv/4/

Screenshots

No response

Version

175

Device

No response

Browser

No response

OS

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions