Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Demo Making    >>    demostu2
   
 
 DemoStuff #2 - Collection of Demo Effects   Bjarke Viksoe 15.12.94

Второй выпуск коллекции трехмерных демо-эффектов от Bjarke Viksoe: точечный туннель, несколько вариантов затенения (точечное, Gourad), несколько вариантов текстурирования, поэтапная разработка интерьеров в стиле Doom. Всего 15 программ.
Second bunch of great demos by Bjarke Viksoe: It's bits and scraps of demo code. Gouraud shading, texture mapping and other kinds of shading.



97k 
 

(December 1994) Hi there, First of all I want to thank all of you who wrote to me because of the DEMOSTUF.ZIP source codes. I really appreciate all of your support and finally I decided that perhaps I would do some more sources. This time it's also bits and scraps of demo code. Gouraud shading, texture mapping and other kinds of shading are the main issues. Tried to comment the sources a bit better, but I still lack much I think (really hate writing documentation). As usual I use Borland Pascal v7.0 with loads of in-line assembly. Many had problems with my sources last time. Some because of a bug in the code that crashed some machines. But most were trying to run the sources from TP6.0 (or lower): If you have TP6.0 you need to take care of the "SEGA000". I think I have fixed it with the "SEGA000 : word = $A000". Anyway. To compile these sources, turn on '286 code generation, put all stack/range checking off. And hope it all works well. Units are not totally compatible with DEMOSTUF.ZIP. In some cases you need to include the PICTURE unit. If you run low on memory, compile it, quit the IDE and run it from dos! Hints: The red area on the screen is how much raster-time the routine takes up! You can turn it off by setting an "{" i front of the "{$DEFINE DEBUG}" line! The "r:=LongMul(x,y)" is "r:=x*y" and "r:=LongDiv(x,y)" is "r:=x DIV y"! The one routine that is used by allmost ALL sources is: xpos:=x1 SHL 16; xadd:=((x2-x1) SHL 16) DIV (y2-y1); for i:=y1 to y2 do begin writeln(xpos SHR 16); inc(xpos,xadd); end; or some variation written in asm. It produces a slope-array of (y2-y1) positions ranging from [x1..x2] ( = interpolation?)! And one thing, I don't know how you intend to use these source codes out there. But I'm NOT in favour of the "hey, rip my source code" feeling. I actually don't care if you simply replace the colours and release it in your name; but try to be a bit more clever than that: Look at the sources, try to figure out what happens, and make your own version (much better and ten times faster, of course! :) Anyway, there are about 40 downloads of my DEMOSTUF.ZIP sources right now every week. Imagine how boring it would be to see 40 demos with the same crappy routines every week! If you do use them, please remeber to mention my name :) Special thanx, hellos and acknowledgements: Commodore Amiga Mark Feldman and PCGPE Peter V and friends from Lyngby Udd.Center. John B, Ervin and Aaron from Australia for nice talks lately. All x-Parasite/Amiga members and members of Polka Brothers/Amiga! If you have any questions or wanna chat, write to me at: Bjarke Viksoe Norrebred 139 2625 Vallensbaek Denmark Please don't use the e-mail address from the DEMOSTUF.ZIP! I will have left school when you read this and don't have an account on the net anymore. Sorry, I'll miss you all. ; Legal stuff: ; These source codes may be used freely as you please. ; They can be copied freely as long as nothing is charged for a copy ; and as long as all files are included and nothing is modified. ; I offer no warranty with this code whatsoever, including its ; fitness for any particular purpose. Neither shall I ; be liable for damages of any kind that may arise from its use. And remember: Pascal rulez, but asm rulez even more! happy programming Bjarke Viksoe