Skip to content

Should material.specular be set to a vector3? #102

@SwordOfWrynn

Description

@SwordOfWrynn

I was using the code from the lighting tutorials while looking at the debug one, and last line (171) of the following code in the Window class for Lighting Ch.4

`// Here we specify to the shaders what textures they should refer to when we want to get the positions.

        _lightingShader.SetInt("material.diffuse", 0);

        _lightingShader.SetInt("material.specular", 1);

        _lightingShader.SetVector3("material.specular", new Vector3(0.5f, 0.5f, 0.5f));`

is causing a GL error
"[DebugSeverityHigh source=DebugSourceApi type=DebugTypeError id=1282] GL_INVALID_OPERATION error generated. Invalid component count."
with debugging enabled

This also exists in all subsequent chapter's windows. I believe that that last line is an error that was left in when Lighting Ch.4 changed material.specular in lighting.frag from a vec3 to a sampler2D.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomersquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions