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 11image_width = 1920
22image_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 {
9696 } ;
9797 }
9898 } ,
99- DataType :: RAW | DataType :: KFB => {
99+ DataType :: RAW => {
100100 let escape_radius_ln = 1e16f32 . ln ( ) ;
101101
102102 for pixel in pixel_data {
@@ -114,6 +114,24 @@ impl DataExport {
114114 self . smooth [ k] = 1.0 - ( z_norm. ln ( ) / escape_radius_ln) . log2 ( ) ;
115115 }
116116 } ,
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+ } ,
117135 DataType :: BOTH => {
118136 let escape_radius_ln = 1e16f32 . ln ( ) ;
119137
@@ -197,7 +215,7 @@ impl DataExport {
197215 let test2 = [ self . image_height as u32 ] ;
198216
199217 // iteration division??
200- let test3 = [ 0.1f32 ] ;
218+ let test3 = [ 1u32 ] ;
201219
202220 // Colours in colourmap
203221 let test5 = DataExport :: generate_colour_palette ( ) ;
You can’t perform that action at this time.
0 commit comments