Comments (3)
Thank you for reporting. Would it be possible to share a minimal sketch which recreates this bug so I can test it?
from processing-postfx.
Hey, thanks for the quick reply!
I think I have located the cause in the image feedback loop to get afterimages - When this is enabled, the issue occurs.
import ch.bildspur.postfx.builder.*;
import ch.bildspur.postfx.pass.*;
import ch.bildspur.postfx.*;
PostFX fx;
PImage c;
int firstcycle;
//afterimage settings
float tracerScaling = 0.97;
float trOffsetX = 6;
float trOffsetY = -6;
void setup() {
size(1024, 1024, P2D);
fx = new PostFX(this,1024,1024);
firstcycle = 1;
} //end setup
void draw() {
background(0,0,0,0);
frameRate(30);
stroke(255);
//draw a white rectangle
rect(312,312,400,400);
//this seeems to be causing trouble V
//disable image pull on 1st cycle to avoid null pointer
if(firstcycle == 1){
firstcycle = 0;
}
else{
//do scaling and translation of image, then display it
c.resize(round(width*tracerScaling),round(height*tracerScaling));
imageMode(CENTER);
image(c,height/2+trOffsetX,width/2+trOffsetY);
}
c = get(); // make a screenshot
// add bloom filter
fx.render()
.sobel()
.bloom(0.5 , 20 , 30)
.compose();
} // draw end
from processing-postfx.
The problem is the imageMode(CENTER);
, which is then also used in compose to draw the buffer to the screen. I would suggest to add the following line:
...
c.resize(round(width*tracerScaling), round(height*tracerScaling));
imageMode(CENTER);
image(c, height/2+trOffsetX, width/2+trOffsetY);
// set image mode back to corner
imageMode(CORNER);
}
...
This should already fix it.
from processing-postfx.
Related Issues (20)
- Clear pass buffer in builder pattern HOT 2
- Resize texture size in builder pattern
- Add shader based blendmodes
- Special buffer for caching passes HOT 1
- Rewrite manual for version 1.1
- Add new examples
- Add saturation and vibrance shader
- Flatten P3D context ot P2D texture
- Shader path method not working on Windows HOT 2
- Add travis build support
- PixelDensity (Retina) does not affect ping-pong buffer HOT 1
- Imcompability with peasycam HOT 3
- Enhancement proposal shadow mapping HOT 1
- License type for effects? HOT 2
- Would it be possible to make an HDR postfx filter? HOT 7
- applying fx after 3d tint produces error HOT 6
- Provide .jar on Github HOT 1
- Black screen using postFX HOT 3
- Is it possible to only affect a PGraphics Layer? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from processing-postfx.