Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

how to make depth layer mapping = world work #47

Open
rock117 opened this issue Feb 23, 2023 · 0 comments
Open

how to make depth layer mapping = world work #47

rock117 opened this issue Feb 23, 2023 · 0 comments

Comments

@rock117
Copy link

rock117 commented Feb 23, 2023

hi Team, sorry, this may not an issue but a Q&A, but since there no Q&A section in the project, so I have to riase an issue here instead.

I am doing a test with the Depth layer, when set mapping to world, it seems that only near/far works, when I changed the position of the mesh, its appearance doesn't changed.

Below is my code
https://github.com/rock117/my-lamina-test/blob/main/src/App.vue

As the document listed and the source code, if my undestanding is correct only the mesh's position effect the material render

 case 'world':
        return `length(v_${uuid}_position - vec3(0.))`

when changed the mesh's position, its appearance should update.

But what ever I changed the position, the appearance still not update.
do I need to set any other settings(except near,far) or invoke any Three/Lamina API to make the material update? thanks.
图片

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant