Skip to content

Chapter 6 - Phong.frag, missing clamp call #36

Open
@ghost

Description

When discussing the Phong.fragshader the book mentions using clamp to limit the Phong RGB components to the 0.0-1.0 range.

The actual clamp call seems to be missing from the shader code, however:
https://github.com/gameprogcpp/code/blob/master/Chapter06/Shaders/Phong.frag

Adding this, the visual result is markedly different:

 Phong = clamp(Phong, 0.0, 1.0); 

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