I want to use post-processing to achieve the effect in the picture, but I can’t convert the coordinates to world coordinates in post-processing.
1 Like
This is kinda the same idea, you might be able to covert parts of it.
Otherwise you can make all the meshes switch over to a shader that displays their world position, and then pass that as a texture buffer to the postpass.
there are a few other ways to do it to.
https://www.easonyi.com/demo/webgl/index.html?scene=scanScene
In threejs I use the following code to convert to the world coordinate system, the result is wrong in babylonjs.
this.postMaterial.uniforms.projScreenMatrixInverse.value.multiplyMatrices(this.camera.projectionMatrix, this.camera.matrixWorldInverse).invert();
Optimized according to this prompt, it is close to the desired effect
This is the current effect:
Optimize scanning effect
2 Likes