Skip to content

filter() does not work after 1.9.0 if noFill() is called #7425

Open
@inaridarkfox4231

Description

@inaridarkfox4231

Topic

filter() was introduced in webgl mode in 1.8.0. At this time, it seems that filter() was still working even with noFill().

// version: 1.8.0
function setup() {
   createCanvas(200,200,WEBGL);
 }
  
 function draw() {
   background(0);
   noFill();
   stroke(255);
   line(-100,-100,300,300);
   filter(INVERT);
 }

cwcdcwvr3v3

However, since 1.9.0, filter() does not work if noFill() is called. Of course it doesn't work with 1.11.2 either.

r3f3f33f33f

It will be drawn when you execute fill().

function setup() {
    createCanvas(200,200,WEBGL);
}

function draw() {
    background(0);
    noFill();
    stroke(255);
    line(-100,-100,300,300);
    
    fill(255);
    
    filter(INVERT);
}

ef3d3frf3f3f3

It seems nonsensical to have to call pointless fill() to filter a sketch that just draws lines.
But I don't know if this is a bug or not.

That's all for raising the issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions