Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

how to make depth layer mapping = world work #47

Description

@rock117

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.
图片

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions