Skip to content

Commit fbe3663

Browse files
committed
Release v1.17
1 parent 16ad451 commit fbe3663

File tree

3 files changed

+12
-29
lines changed

3 files changed

+12
-29
lines changed

examples/Miscellaneous/ColorPalletteMixer/ColorPalletteMixer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ColorPalletteMixer extends PApplet {
2121
// Example for getting a smooth color from a discrete color pallette.
2222

2323
public void settings(){
24-
size(1200, 600, P2D);
24+
size(1000, 100, P2D);
2525
}
2626

2727
public void setup(){

examples/Miscellaneous/DepthOfField_Demo/DepthOfField_Demo.java

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import com.thomasdiewald.pixelflow.java.geometry.DwMeshUtils;
2121
import com.thomasdiewald.pixelflow.java.imageprocessing.filter.DepthOfField;
2222
import com.thomasdiewald.pixelflow.java.imageprocessing.filter.DwFilter;
23-
import com.thomasdiewald.pixelflow.java.imageprocessing.filter.SummedAreaTable;
2423
import com.thomasdiewald.pixelflow.java.render.skylight.DwSceneDisplay;
2524
import com.thomasdiewald.pixelflow.java.render.skylight.DwScreenSpaceGeometryBuffer;
2625
import com.thomasdiewald.pixelflow.java.utils.DwMagnifier;
@@ -61,8 +60,6 @@ public class DepthOfField_Demo extends PApplet {
6160
PGraphics3D pg_tmp;
6261
DwScreenSpaceGeometryBuffer geombuffer;
6362

64-
SummedAreaTable sat;
65-
6663
DepthOfField dof;
6764

6865
DwMagnifier magnifier;
@@ -92,11 +89,6 @@ public void setup() {
9289
// projection
9390
perspective(60 * DEG_TO_RAD, width/(float)height, 2, 6000);
9491

95-
// processing font
96-
97-
// shape = loadShape("examples/data/skylight_demo_scene.obj");
98-
// shape.scale(20);
99-
10092
pg_render = (PGraphics3D) createGraphics(width, height, P3D);
10193
pg_render.smooth(8);
10294

@@ -106,24 +98,17 @@ public void setup() {
10698
pg_dof.beginDraw();
10799
pg_dof.endDraw();
108100

109-
110-
pg_tmp = (PGraphics3D) createGraphics(width, height, P3D);
101+
pg_tmp = (PGraphics3D) createGraphics(width, height, P3D);
111102
pg_tmp.smooth(0);
112103

113104
DwGLTextureUtils.changeTextureFormat(pg_tmp, GL2.GL_RGBA16F, GL2.GL_RGBA, GL2.GL_FLOAT);
114105
pg_tmp.beginDraw();
115-
// pg_tmp.hint(PConstants.DISABLE_TEXTURE_MIPMAPS);
116-
// pg_tmp.textureSampling(2);
117-
// pg_tmp.background(0xFFFFFFFF);
118-
// pg_tmp.blendMode(PConstants.REPLACE);
119-
// pg_tmp.noStroke();
120106
pg_tmp.endDraw();
121107

122108
// main library context
123109
context = new DwPixelFlow(this);
124110
context.print();
125111
context.printGL();
126-
127112

128113

129114
// callback for scene display (used in GBAA)
@@ -134,14 +119,11 @@ public void display(PGraphics3D canvas) {
134119
}
135120
};
136121

137-
sat = new SummedAreaTable(context);
138-
139122

140123
geombuffer = new DwScreenSpaceGeometryBuffer(context, scene_display);
141124

142125
dof = new DepthOfField(context);
143126

144-
145127
int mag_h = (int) (height/3f);
146128
magnifier = new DwMagnifier(this, 4, 0, height-mag_h, mag_h, mag_h);
147129

@@ -164,29 +146,30 @@ public void draw() {
164146

165147
DwFilter.get(context).gaussblur.apply(geombuffer.pg_geom, geombuffer.pg_geom, pg_tmp, 5);
166148

167-
// sat.create(pg_render);
168-
169149
// dof.param.focus = map(mouseX, 0, width, 0, 1);
170150
dof.param.focus_pos = new float[]{0.5f, 0.5f};
171151
dof.param.focus_pos[0] = map(mouseX+0.5f, 0, width , 0, 1);
172152
dof.param.focus_pos[1] = map(mouseY+0.5f, 0, height, 1, 0);
173153
dof.param.mult_blur = mult_blur;
174-
dof.apply(pg_render, pg_dof,geombuffer);
154+
dof.apply(pg_render, pg_dof, geombuffer);
155+
156+
DwFilter.get(context).copy.apply(pg_dof, pg_render);
157+
} else {
158+
175159
}
176160

177-
magnifier.apply(pg_dof, mouseX, mouseY);
161+
magnifier.apply(pg_render, mouseX, mouseY);
178162
magnifier.displayTool();
179163

180164
peasycam.beginHUD();
181165
{
182166
blendMode(REPLACE);
183167
clear();
184-
image(pg_dof, 0, 0);
168+
image(pg_render, 0, 0);
185169
// image(geombuffer.pg_geom, 0, 0);
186170

187171
magnifier.display(this.g);
188172

189-
190173
blendMode(BLEND);
191174

192175
pushMatrix();

src/com/thomasdiewald/pixelflow/java/DwPixelFlow.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class DwPixelFlow{
3838

3939
static public class PixelFlowInfo{
4040

41-
static public final String version = "1.16";
41+
static public final String version = "1.17";
4242
static public final String name = "PixelFlow";
4343
static public final String author = "Thomas Diewald";
4444
static public final String web = "www.thomasdiewald.com";
@@ -56,8 +56,8 @@ public String toString(){
5656
}
5757

5858

59-
// public static final String SHADER_DIR = "/com/thomasdiewald/pixelflow/glsl/";
60-
public static final String SHADER_DIR = "D:/data/__Eclipse/workspace/WORKSPACE_FLUID/PixelFlow/src/com/thomasdiewald/pixelflow/glsl/";
59+
public static final String SHADER_DIR = "/com/thomasdiewald/pixelflow/glsl/";
60+
// public static final String SHADER_DIR = "D:/data/__Eclipse/workspace/WORKSPACE_FLUID/PixelFlow/src/com/thomasdiewald/pixelflow/glsl/";
6161

6262
public PApplet papplet;
6363
public PJOGL pjogl;

0 commit comments

Comments
 (0)