Skip to content

In Lesson 6, matrix used to transform normal vector in Darboux frame may be wrong. #155

Open
@Exisfar

Description

@Exisfar

I learned that we need to use normal vector in view space to compute the illumination whereas you computed it in clip space. I think passing (Projection*ModelView).inverse_transpose may be wrong. Instead we should pass ModelView.inverse_transpose to compute the transformed normal vector?

My opinion:

Shader shader(ModelView, (Projection*ModelView).invert_transpose(), M*(Viewport*Projection*ModelView).invert());

to

Shader shader(ModelView, (ModelView).invert_transpose(), M*(Viewport*Projection*ModelView).invert());

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