Skip to content

WebGLRenderer: Difference between Scene.background and setClearColor() #22340

Open
@Mugen87

Description

@Mugen87

Using Scene.background and WebGLRenderer.setClearColor() produces the same output in the following demos:

Scene.background: https://jsfiddle.net/xkf3o8uw/5/
setClearColor(): https://jsfiddle.net/xkf3o8uw/4/

However, when setting autoClear to false, the behavior is different:

Scene.background: https://jsfiddle.net/0o38d67m/
setClearColor(): https://jsfiddle.net/xkf3o8uw/2/

Scene.background still works because of this line in Scene.background:

What is the reason for this discrepancy? Does it just mean Scene.background used with a color should be decoupled of autoClear settings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions