November 28, 2020, 02:16:41 PM

Author Topic: [bb] Planet halo/sunflare without clipping problems by Rob [ 1+ years ago ]  (Read 547 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : Planet halo/sunflare without clipping problems
Author : Rob
Posted : 1+ years ago

Description : This is useful in many situations. For example, you really do need a beautiful gentle hue around your object however you don't want to use sprites for a variety of reasons. Usually this will be due to clipping problems.

Code :
Code: BlitzBasic
  1. ;bugs: rob@redflame.net
  2. Graphics3D 640,480,16,2
  3. camera=CreateCamera()
  4. planet=CreateSphere()
  5. glow=CreateSphere()
  6. ScaleEntity glow,1.6,1.6,1.6
  7.  
  8. light=CreateLight(2)
  9. MoveEntity light,1000,1000,-1000
  10. MoveEntity camera,0,0,-10
  11.  
  12. tex=CreateTexture(64,64,48+64+512+2)
  13. SetBuffer TextureBuffer(tex)
  14. For i=1 To 64
  15.         Color i*3,i*3,i*4
  16.         Oval i/2,i/2,64-i,64-i,1
  17. Next
  18. EntityTexture glow,tex
  19. EntityBlend glow,3
  20.  
  21. While Not KeyHit(1)
  22.         UpdateWorld
  23.         RenderWorld
  24.         Flip
  25. Wend
  26. End


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal