Skip to content

Chapter 18 shaders aren't working #1

@EricBL3

Description

@EricBL3

Hi, I've been following the exercises in the book and I'm struggling with getting the diffuse & specular lighting to work in the last exercises of Chapter 18. I think that the problem is the calculation of the diffuse but I couldn't find the files for the shaders in the repo to check if I'm missing something. Here are some screenshots for reference of the content of my shaders:

texturedvert.vs
image

lighting.vs
image

result when running the program
image

If I remove the diffuse & specular from the result, I get the expected model without any lighting
image

I'm also able to add the ambient lighting without any problem
image

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