Skip to content

Lighting not changing on model when rotated. #1

@ActingBadly

Description

@ActingBadly

Lighting does not change on the model when it is rotated. I corrected this by adding the following at the bottom on your default.vert shader replacing "normal = updatedNormal;" Seems to work nicely now. Great work, this really helped me get my code working. Cheers.

mat3 normalMatrix = transpose(inverse(mat3(M)));
normal = normalize(normalMatrix * updatedNormal);

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