Skip to content

Why should we make a "viewRay z division" to viewRayOS? #31

Open
@wqaetly

Description

@wqaetly

Good guy, I have some doubts when studying the code, why do we need to do perspective division on the ray from the model space camera to the vertex? In my cognition, perspective division is only to get the NDC coordinates, and there are some unclear meanings here.

大佬好,在研究代码的时候有一些疑惑,为什么要对模型空间相机到顶点的射线做透视除法,在我的认知里透视除法只是为了得到NDC坐标,而这里让我有些摸不到头脑

i.viewRayOS.xyz = i.viewRayOS.xyz / i.viewRayOS.w;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions