File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1
1
image_width = 1920
2
2
image_height = 1080
3
- frames = 1
4
- export = " raw"
5
- rotate = 0
3
+ frames = 50
4
+ export = " kfb"
5
+ rotate = 0
6
+ glitch_tolerance = 0.000001
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl DataExport {
96
96
} ;
97
97
}
98
98
} ,
99
- DataType :: RAW | DataType :: KFB => {
99
+ DataType :: RAW => {
100
100
let escape_radius_ln = 1e16f32 . ln ( ) ;
101
101
102
102
for pixel in pixel_data {
@@ -114,6 +114,24 @@ impl DataExport {
114
114
self . smooth [ k] = 1.0 - ( z_norm. ln ( ) / escape_radius_ln) . log2 ( ) ;
115
115
}
116
116
} ,
117
+ DataType :: KFB => {
118
+ let escape_radius_ln = 1e16f32 . ln ( ) ;
119
+
120
+ for pixel in pixel_data {
121
+ let k = pixel. image_x * self . image_height + pixel. image_y ;
122
+
123
+ self . iterations [ k] = if pixel. glitched {
124
+ 0x00000000
125
+ } else if pixel. iteration >= maximum_iteration {
126
+ 0xFFFFFFFF
127
+ } else {
128
+ pixel. iteration as u32
129
+ } ;
130
+
131
+ let z_norm = ( reference. reference_data [ pixel. iteration - reference. start_iteration ] . z_fixed + pixel. delta_current . mantissa ) . norm_sqr ( ) as f32 ;
132
+ self . smooth [ k] = 1.0 - ( z_norm. ln ( ) / escape_radius_ln) . log2 ( ) ;
133
+ }
134
+ } ,
117
135
DataType :: BOTH => {
118
136
let escape_radius_ln = 1e16f32 . ln ( ) ;
119
137
@@ -197,7 +215,7 @@ impl DataExport {
197
215
let test2 = [ self . image_height as u32 ] ;
198
216
199
217
// iteration division??
200
- let test3 = [ 0.1f32 ] ;
218
+ let test3 = [ 1u32 ] ;
201
219
202
220
// Colours in colourmap
203
221
let test5 = DataExport :: generate_colour_palette ( ) ;
You can’t perform that action at this time.
0 commit comments