Recent

Author Topic: Demo Scene Picture sinwave  (Read 1813 times)

Gigatron

  • Full Member
  • ***
  • Posts: 154
  • Amiga Rulez !!
Demo Scene Picture sinwave
« on: April 23, 2024, 09:00:25 pm »
Hi,
Let's continue with the Bitmap.PutImagePart from BGRA component, usefull now to make
flag wave or ... under 70 lines of code running for me at 60 fps, so play with....

Picture  by TorinoGT;

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen,BGRABitmap, BGRABitmapTypes;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  17.     Timer1: TTimer;
  18.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  19.     procedure FormCreate(Sender: TObject);
  20.     procedure Timer1Timer(Sender: TObject);
  21.   private
  22.  
  23.   public
  24.  
  25.   end;
  26.  
  27. var
  28.   Form1: TForm1;
  29.   Plasma: TBGRABitmap;
  30.   acc : integer;
  31.  
  32. implementation
  33.  
  34. {$R *.lfm}
  35.  
  36. { TForm1 }
  37.  
  38. procedure TForm1.FormCreate(Sender: TObject);
  39. begin
  40.     Plasma := TBGRABitmap.Create('warrior1.png');
  41.     acc := 0;
  42.  
  43. end;
  44. // wobble or sinwave !!
  45. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  46. var
  47.   i : integer;
  48.   w : integer;
  49. begin
  50.      i:=0;
  51.      w:=0;
  52.  
  53.      Bitmap.Fill(BGRAPixelTransparent);
  54.      acc := acc +1;
  55.  
  56.      for i:=0 to 120 do
  57.      begin
  58.      w := round(50 + (10 * sin((i+acc) * 8 * PI / 180)));
  59.      Bitmap.PutImagePart(0, i*5-4 , Plasma,  Rect(w,  i*5-4,  600*w ,i*10+4), dmSet);
  60.      end;
  61. end;
  62.  
  63. procedure TForm1.Timer1Timer(Sender: TObject);
  64. begin
  65.  
  66.        BGRAVirtualScreen1.RedrawBitmap;
  67. end;
  68.  
  69. end.
  70.  

** Edit drawMode to dmSet thx to @KodeZwerg;
« Last Edit: April 24, 2024, 03:13:08 am by Gigatron »
Sub Quantum Technology ! Gigatron 68000 Colmar France;

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Demo Scene Picture sinwave
« Reply #1 on: April 23, 2024, 10:26:21 pm »
Code: Pascal  [Select][+][-]
  1.      Bitmap.PutImagePart(0, i*5-4 , Plasma,  Rect(w,  i*5-4,  600*w ,i*10+4), dmDrawWithTransparency);
Should be
Code: Pascal  [Select][+][-]
  1.      Bitmap.PutImagePart(0, i*5-4 , Plasma,  Rect(w,  i*5-4,  600*w ,i*10+4), dmSet);
for best performance.

Nice wiggle effect!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: Demo Scene Picture sinwave
« Reply #2 on: April 24, 2024, 07:27:02 pm »
Nice effect with PutImagePart.  :)

About optimization, there is mistake in the rectangular area provided to PutImagePart, it would rather be:
Code: Pascal  [Select][+][-]
  1. Bitmap.PutImagePart(0, i*5-4 , Plasma,  Rect(w,  i*5-4,  600*w ,(i+1)*5-4), dmSet);

Also you don't need to call Bitmap.Fill because it is already cleared by the component.

Another way to do the effect is to define a scanner:
Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen, BGRABitmap, BGRABitmapTypes, BGRATransform;
  10.  
  11. type
  12.   TWaveScanner = class(TBGRABitmapScanner)
  13.     Time: integer;
  14.     function GetOffset({%H-}X, Y: Single): Single;
  15.     { fast integer scanning (used by PutImage) }
  16.     procedure ScanMoveTo(X, Y: Integer); override;
  17.     { slow floating point scanning }
  18.     function ScanAt(X, Y: Single): TBGRAPixel; override;
  19.     constructor Create(ASource: TBGRACustomBitmap;
  20.       ARepeatX,ARepeatY: boolean; AOrigin: TPoint);
  21.   end;
  22.  
  23.   { TForm1 }
  24.  
  25.   TForm1 = class(TForm)
  26.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  27.     Timer1: TTimer;
  28.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  29.     procedure FormCreate(Sender: TObject);
  30.     procedure Timer1Timer(Sender: TObject);
  31.   private
  32.     Image: TBGRABitmap;
  33.     WaveScanner: TWaveScanner;
  34.   public
  35.   end;
  36.  
  37. var
  38.   Form1: TForm1;
  39.  
  40. implementation
  41.  
  42. {$R *.lfm}
  43.  
  44. { TForm1 }
  45.  
  46. procedure TForm1.FormCreate(Sender: TObject);
  47. begin
  48.   Image := TBGRABitmap.Create('warrior1.png');
  49.   WaveScanner := TWaveScanner.Create(Image,
  50.               true, true, Point(0, 0));
  51. end;
  52.  
  53. // wobble or sinwave !!
  54. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  55. begin
  56.   WaveScanner.Time := WaveScanner.Time + 1;
  57.   Bitmap.Fill(WaveScanner);
  58. end;
  59.  
  60. procedure TForm1.Timer1Timer(Sender: TObject);
  61. begin
  62.   BGRAVirtualScreen1.RedrawBitmap;
  63. end;
  64.  
  65. { TWaveScanner }
  66.  
  67. function TWaveScanner.GetOffset(X, Y: Single): Single;
  68. begin
  69.   result := 50 + (10 * sin((Y + Time*5) * 8/5 * PI / 180));
  70. end;
  71.  
  72. procedure TWaveScanner.ScanMoveTo(X, Y: Integer);
  73. begin
  74.   inherited ScanMoveTo(X + round(GetOffset(X, Y)), Y);
  75. end;
  76.  
  77. function TWaveScanner.ScanAt(X, Y: Single): TBGRAPixel;
  78. begin
  79.   Result:=inherited ScanAt(X + GetOffset(X, Y), Y);
  80. end;
  81.  
  82. constructor TWaveScanner.Create(ASource: TBGRACustomBitmap;
  83.   ARepeatX,ARepeatY: boolean; AOrigin: TPoint);
  84. begin
  85.   inherited Create(ASource, ARepeatX, ARepeatY, AOrigin);
  86.   Time := 0;
  87. end;
  88.  
  89. end.

This way you can combine transforms, for example with a rotation:
Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen, BGRABitmap, BGRABitmapTypes, BGRATransform;
  10.  
  11. type
  12.   TWaveScanner = class(TBGRAAffineBitmapTransform)
  13.     Time: integer;
  14.     function GetOffset({%H-}X, Y: Single): Single;
  15.     { fast integer scanning (used by PutImage) }
  16.     procedure ScanMoveTo(X, Y: Integer); override;
  17.     { slow floating point scanning }
  18.     function ScanAt(X, Y: Single): TBGRAPixel; override;
  19.     constructor Create(ASource: TBGRACustomBitmap;
  20.       ARepeatX,ARepeatY: boolean);
  21.   end;
  22.  
  23.   { TForm1 }
  24.  
  25.   TForm1 = class(TForm)
  26.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  27.     Timer1: TTimer;
  28.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  29.     procedure FormCreate(Sender: TObject);
  30.     procedure Timer1Timer(Sender: TObject);
  31.   private
  32.     Image: TBGRABitmap;
  33.     WaveScanner: TWaveScanner;
  34.   public
  35.   end;
  36.  
  37. var
  38.   Form1: TForm1;
  39.  
  40. implementation
  41.  
  42. {$R *.lfm}
  43.  
  44. { TForm1 }
  45.  
  46. procedure TForm1.FormCreate(Sender: TObject);
  47. begin
  48.   Image := TBGRABitmap.Create('warrior1.png');
  49.   WaveScanner := TWaveScanner.Create(Image, true, true);
  50. end;
  51.  
  52. // wobble or sinwave !!
  53. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  54. begin
  55.   WaveScanner.Time := WaveScanner.Time + 1;
  56.   WaveScanner.Translate(-ClientWidth/2, -ClientWidth/2);
  57.   WaveScanner.RotateDeg(1);
  58.   WaveScanner.Translate(ClientWidth/2, ClientWidth/2);
  59.   Bitmap.Fill(WaveScanner);
  60. end;
  61.  
  62. procedure TForm1.Timer1Timer(Sender: TObject);
  63. begin
  64.   BGRAVirtualScreen1.RedrawBitmap;
  65. end;
  66.  
  67. { TWaveScanner }
  68.  
  69. function TWaveScanner.GetOffset(X, Y: Single): Single;
  70. begin
  71.   result := 50 + (10 * sin((Y + Time*5) * 8/5 * PI / 180));
  72. end;
  73.  
  74. procedure TWaveScanner.ScanMoveTo(X, Y: Integer);
  75. begin
  76.   inherited ScanMoveTo(X + round(GetOffset(X, Y)), Y);
  77. end;
  78.  
  79. function TWaveScanner.ScanAt(X, Y: Single): TBGRAPixel;
  80. begin
  81.   Result:=inherited ScanAt(X + GetOffset(X, Y), Y);
  82. end;
  83.  
  84. constructor TWaveScanner.Create(ASource: TBGRACustomBitmap;
  85.   ARepeatX,ARepeatY: boolean);
  86. begin
  87.   inherited Create(ASource, ARepeatX, ARepeatY);
  88.   Time := 0;
  89. end;
  90.  
  91. end.
« Last Edit: April 24, 2024, 07:29:57 pm by circular »
Conscience is the debugger of the mind

Gigatron

  • Full Member
  • ***
  • Posts: 154
  • Amiga Rulez !!
Re: Demo Scene Picture sinwave
« Reply #3 on: April 25, 2024, 12:48:52 am »
Thank you circular , the BGRA is very powerfull to make demos.

My goal is make simple and short code for each demo part eg:
Copper bars, bitmap font scroller, sinwave, blitter obj (bob) plasma  and so on like Amiga demos.
After that i can combine all fx to make big demo with each part ;
So thank you again for the sinwave fx and here is the short version 60 lines with correction .

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen, BGRABitmap, BGRABitmapTypes;
  10.  
  11. type
  12.   { TForm1 }
  13.   TForm1 = class(TForm)
  14.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  15.     Timer1: TTimer;
  16.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  17.     procedure FormCreate(Sender: TObject);
  18.     procedure Timer1Timer(Sender: TObject);
  19.  
  20.   private
  21.  
  22.   public
  23.  
  24.   end;
  25.  
  26. var
  27.   Form1: TForm1;
  28.   Bmp  : TBGRABitmap;  // bmp mean picture :)
  29.   acc  : integer;
  30.  
  31. implementation
  32.  
  33. {$R *.lfm}
  34.  
  35. { TForm1 }
  36.  
  37. procedure TForm1.FormCreate(Sender: TObject);
  38. begin
  39.     Bmp := TBGRABitmap.Create('warrior1.png');
  40.     acc := 0;
  41. end;
  42.  
  43. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);   // wobble or sinwave !!
  44. var i,w : integer;
  45. begin
  46.      i :=0; w :=0; acc := acc + 1;
  47.      for i:=0 to Bmp.Height div 5 do   //
  48.      begin
  49.      w := round(50 + (10 * sin((i+acc) * 6 * PI / 180)));
  50.      Bitmap.PutImagePart(0, i*5-4 , Bmp,  Rect(-50+w,  i*5-4,  Bmp.Width*w ,(i+1)*5-4), dmSet); // xoffset to -50 to center bmp
  51.      end;
  52. end;
  53. procedure TForm1.Timer1Timer(Sender: TObject);
  54. begin
  55.      BGRAVirtualScreen1.RedrawBitmap;
  56. end;
  57.  
  58. end.
  59.  
« Last Edit: April 25, 2024, 01:22:54 am by Gigatron »
Sub Quantum Technology ! Gigatron 68000 Colmar France;

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Demo Scene Picture sinwave
« Reply #4 on: April 25, 2024, 01:28:20 am »
Another way to do the effect is to define a scanner:
I do liking it a lot but could you assist me with a struggle where I having a blackout and dont know what to do:
how do i center "any" image inside the virtualscreen please?
with "any" i do mean a calculated center from different sized images in different sized virtualscreen, so when it rotate, that it rotate around itself, like a turntable.
as of right now it rotate... how to say... unlike a turntable centered, its off-set from center and turn egg-like.

If it would not be too much work, there is another question in that direction
imagine i do have a round logo, like the fpc paw, where outside of the logo is transparent area, would your method already work with such that only visible pixels are drawn or would it rotate a black screen with a logo in middle?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

TRon

  • Hero Member
  • *****
  • Posts: 3619
Re: Demo Scene Picture sinwave
« Reply #5 on: April 25, 2024, 03:22:33 am »
Let's continue with the Bitmap.PutImagePart from BGRA component, usefull now to make
flag wave or ... under 70 lines of code running for me at 60 fps, so play with....

Very nice Gigatron !!. Again a sub with many trades... let's try push it  :)

Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen, BGRABitmap;
  10.  
  11. type
  12.  
  13.   { TForm1 }
  14.  
  15.   TForm1 = class(TForm)
  16.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  17.     Timer1: TTimer;
  18.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  19.     procedure FormCreate(Sender: TObject);
  20.     procedure FormDestroy(Sender: TObject);
  21.     procedure Timer1Timer(Sender: TObject);
  22.   private
  23.  
  24.   public
  25.  
  26.   end;
  27.  
  28. var
  29.   Form1: TForm1;
  30.   Plasma: TBGRABitmap;
  31.   acc: integer = 0;
  32.  
  33. implementation
  34.  
  35. {$R *.lfm}
  36.  
  37. uses
  38.   BGRABitmapTypes;
  39.  
  40. { TForm1 }
  41.  
  42. procedure TForm1.FormCreate(Sender: TObject);
  43. begin
  44.   Timer1.Interval := round(1000/25);
  45.   BGRAVirtualScreen1.Width := 800;
  46.   BGRAVirtualScreen1.Height := 600;
  47.   BGRAVirtualScreen1.BitmapAutoScale:=false;
  48.   Plasma := TBGRABitmap.Create('warrior1.png');
  49. end;
  50.  
  51. procedure TForm1.FormDestroy(Sender: TObject);
  52. begin
  53.   Plasma.Free;
  54. end;
  55.  
  56. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  57. var
  58.   i : integer;
  59.   w : integer;
  60.   x : integer;
  61.   y : integer;
  62.   speed: integer = 4;
  63. begin
  64.   Bitmap.Fill(BGRAPixelTransparent);
  65.   acc := acc + 1;
  66.  
  67.   x := (BGRAVirtualScreen1.ClientRect.Width  - Plasma.ClipRect.Width)  shr 1;
  68.   y := (BGRAVirtualScreen1.CLientRect.Height - Plasma.ClipRect.Height) shr 1;
  69.  
  70.   for i := 0 to Plasma.ClipRect.Height-1 do
  71.   begin
  72.     if odd(i)
  73.      then w := round( i * sin(acc * speed * PI / 180))
  74.       else w := round( i * cos(acc * speed * PI / 180));
  75.  
  76.     Bitmap.PutImagePart
  77.     (
  78.       x + w,
  79.       y + i,
  80.       Plasma,
  81.       Rect(Plasma.ClipRect.Left , Plasma.ClipRect.Top + i, Plasma.ClipRect.Right , Plasma.ClipRect.Top + i + 1),
  82.       dmSet
  83.     );
  84.   end;
  85. end;
  86.  
  87. procedure TForm1.Timer1Timer(Sender: TObject);
  88. begin
  89.   BGRAVirtualScreen1.RedrawBitmap;
  90. end;
  91.  
  92. end.

This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Gigatron

  • Full Member
  • ***
  • Posts: 154
  • Amiga Rulez !!
Re: Demo Scene Picture sinwave
« Reply #6 on: April 25, 2024, 03:42:01 am »
Very nice , it reminds me my shadertoy example

 https://www.shadertoy.com/view/4s3SR4
Sub Quantum Technology ! Gigatron 68000 Colmar France;

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: Demo Scene Picture sinwave
« Reply #7 on: April 25, 2024, 07:54:28 pm »
I do liking it a lot but could you assist me with a struggle where I having a blackout and dont know what to do:
how do i center "any" image inside the virtualscreen please?
with "any" i do mean a calculated center from different sized images in different sized virtualscreen, so when it rotate, that it rotate around itself, like a turntable.
Sure it is not trivial. Basically, you need to consider when the rotation is applied that it rotates around the origin (0, 0). In this example, one can center by first bringing the origin to the middle of the image in the scanner. Then when drawing, one need to apply an offset so that this origin is at the center of the virtual screen:
Code: Pascal  [Select][+][-]
  1. unit Unit1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. interface
  6.  
  7. uses
  8.   Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  9.   BGRAVirtualScreen, BGRABitmap, BGRABitmapTypes, BGRATransform;
  10.  
  11. type
  12.   TWaveScanner = class(TBGRAAffineBitmapTransform)
  13.     Time: integer;
  14.     function GetOffset({%H-}X, Y: Single): Single;
  15.     { fast integer scanning (used by PutImage) }
  16.     procedure ScanMoveTo(X, Y: Integer); override;
  17.     { slow floating point scanning }
  18.     function ScanAt(X, Y: Single): TBGRAPixel; override;
  19.     constructor Create(ASource: TBGRACustomBitmap;
  20.       ARepeatX,ARepeatY: boolean);
  21.   end;
  22.  
  23.   { TForm1 }
  24.  
  25.   TForm1 = class(TForm)
  26.     BGRAVirtualScreen1: TBGRAVirtualScreen;
  27.     Timer1: TTimer;
  28.     procedure BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  29.     procedure FormCreate(Sender: TObject);
  30.     procedure Timer1Timer(Sender: TObject);
  31.   private
  32.     Image: TBGRABitmap;
  33.     WaveScanner: TWaveScanner;
  34.   public
  35.   end;
  36.  
  37. var
  38.   Form1: TForm1;
  39.  
  40. implementation
  41.  
  42. {$R *.lfm}
  43.  
  44. { TForm1 }
  45.  
  46. procedure TForm1.FormCreate(Sender: TObject);
  47. begin
  48.   Image := TBGRABitmap.Create('warrior1.png');
  49.   WaveScanner := TWaveScanner.Create(Image, false, false);
  50.   // for the scanner, translate so that the origin (0, 0) is now at the center of the image
  51.   WaveScanner.Translate(-Image.Width/2, -Image.Height/2);
  52. end;
  53.  
  54. // wobble or sinwave !!
  55. procedure TForm1.BGRAVirtualScreen1Redraw(Sender: TObject; Bitmap: TBGRABitmap);
  56. begin
  57.   WaveScanner.Time := WaveScanner.Time + 1;
  58.   WaveScanner.RotateDeg(1);
  59.   // when drawing, use an negative offset so that we get to the origin of the scanner
  60.   // at the center of the virtual screen
  61.   Bitmap.FillRect(Bitmap.ClipRect, WaveScanner, dmSet,
  62.     Point(-ClientWidth div 2, -ClientHeight div 2));
  63. end;
  64.  
  65. procedure TForm1.Timer1Timer(Sender: TObject);
  66. begin
  67.   BGRAVirtualScreen1.RedrawBitmap;
  68. end;
  69.  
  70. { TWaveScanner }
  71.  
  72. function TWaveScanner.GetOffset(X, Y: Single): Single;
  73. begin
  74.   // removed the constant in the offset so that this value oscillates around zero
  75.   // keeping the centering intact
  76.   result := 10 * sin((Y + Time*5) * 8/5 * PI / 180);
  77. end;
  78.  
  79. procedure TWaveScanner.ScanMoveTo(X, Y: Integer);
  80. begin
  81.   inherited ScanMoveTo(X + round(GetOffset(X, Y)), Y);
  82. end;
  83.  
  84. function TWaveScanner.ScanAt(X, Y: Single): TBGRAPixel;
  85. begin
  86.   Result:=inherited ScanAt(X + GetOffset(X, Y), Y);
  87. end;
  88.  
  89. constructor TWaveScanner.Create(ASource: TBGRACustomBitmap;
  90.   ARepeatX,ARepeatY: boolean);
  91. begin
  92.   inherited Create(ASource, ARepeatX, ARepeatY);
  93.   Time := 0;
  94. end;
  95.  
  96. end.

Quote
If it would not be too much work, there is another question in that direction
imagine i do have a round logo, like the fpc paw, where outside of the logo is transparent area, would your method already work with such that only visible pixels are drawn or would it rotate a black screen with a logo in middle?
It depends on the draw mode. Here it is dmSet so opaque but you can use dmDrawWithTransparency when filling a rectangle. Note that I replace the call to Fill by a call to FillRect which has more flexibility.
Conscience is the debugger of the mind

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: Demo Scene Picture sinwave
« Reply #8 on: April 25, 2024, 08:44:21 pm »
@circular: Exact what I was asking for, purrrfectissimo! Many thanks for your code pearl!!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: Demo Scene Picture sinwave
« Reply #9 on: April 25, 2024, 09:08:38 pm »
You're welcome  :) I am pleased it is purrrrfect for you.  :)
Conscience is the debugger of the mind

TRon

  • Hero Member
  • *****
  • Posts: 3619
Re: Demo Scene Picture sinwave
« Reply #10 on: April 26, 2024, 02:23:15 am »
Very nice , it reminds me my shadertoy example
A that is very nice and indeed is similar in nature. There is another one there as well.

Actually I wished it was easy to re-create the different bitplanes as the original effect I had in mind is waving the different bitplanes (originally done by the copper) so that the picture is only fully visible when all planes align at a single point in time. This is the closest best thing without resorting to spartanic bit-f*ing  :)

This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018