Dark Bit Factory & Gravity

GENERAL => Projects => Topic started by: taj on February 10, 2008

Title: 1k raytracing
Post by: taj on February 10, 2008
Not exactly :-). This is too big and for once I have no idea how to get it smaller (even recoded in d3d and didnt help). Anyway...

Benny asked me if I was working on anything. Actually I've been out of the game for 5 months - no code at all. However, this weekend I dusted off some raytracing, bent the maths and I'm down to this.

NEEDS PS3.0
If your card is old use the 640x480 exe
Otherwise use the 1024x768 exe

Please, I am very interested in Nvidia and Vista results (Jim, Shockie).
Title: Re: 1k raytracing
Post by: zawran on February 10, 2008
the 1024x768 version runs completely smooth on my nvidia 8800gt sli setup.
Title: Re: 1k raytracing
Post by: Stonemonkey on February 10, 2008
Nice screenshot but I get a blank screen.

radeon x1650
Title: Re: 1k raytracing
Post by: taj on February 10, 2008
Nice screenshot but I get a blank screen.

radeon x1650

Make absolutely sure your drivers are up to date as I am using some newly supported features which wont work with old drivers.
Title: Re: 1k raytracing
Post by: Rbz on February 11, 2008
640x480 works fine and smoothly here,  of course 1024x768 is a bit slow, would be really cool if you can display a FPS counter.

P4 WinXP Geforce 6600GT
Title: Re: 1k raytracing
Post by: Pixel_Outlaw on February 11, 2008
What is PS3? I too get just a blank screen.
Title: Re: 1k raytracing
Post by: taj on February 11, 2008
What is PS3? I too get just a blank screen.

Pixel Shaders 3.0...it means you need a good/recent graphics card.
Title: Re: 1k raytracing
Post by: Jim on February 11, 2008
Smooth and glorious in 1970s brown :) (8600GT, Vista)

Jim
Title: Re: 1k raytracing
Post by: benny! on February 11, 2008
Yeeeeeeeeeaaaaaaaaaahhhhhhh ... this baby runs smooth as hell.
Fx roxx. The future has just begun. Rulez!
Title: Re: 1k raytracing
Post by: taj on February 11, 2008
Smooth and glorious in 1970s brown :) (8600GT, Vista)

Jim


Hahahaha, yes I have the candy pink and the 70s brown versions, perhaps Ill go with candy pink :-)
Title: Re: 1k raytracing
Post by: Shockwave on February 11, 2008
Pink?!??!

Nononononononono!!

I love these Toffee Coffee lovely colours it looks great!
Much nicer colours than Tracie!

This can be a comp winner for sure.

No problems running it here the high res version ran perfectly smooth (ATI X1650 ~ Stonemonkey your drivers probably need updating).

Title: Re: 1k raytracing
Post by: taj on February 12, 2008
With some extreme hackery I'm only 14 bytes out. The recursive raytracer is now 10 lines of code. However, no real timer which will be another 10-20 bytes :-(. I dont think this one will ever get released as a 1k unless I switch to assembler.
Title: Re: 1k raytracing
Post by: benny! on February 12, 2008
Add some music and maybe some other
scenes and release it as 4kb production.

This piece deserves to be released !!!
Title: Re: 1k raytracing
Post by: Shockwave on February 12, 2008
Benny has a point. But then again knowing how canny you are Taj, I would bet good money that you'll manage to squish the code a little bit more anyway.
Title: Re: 1k raytracing
Post by: Buckethead on February 12, 2008
Rocks. Both version are smooth and fast here (8800 Nvidia, XP)
Keep working on it, could be a great 4K too, but since you didn't dev something since 5 months, I think you'll manage to squeeze it in 1K in few days ;)
Title: Re: 1k raytracing
Post by: taj on February 13, 2008
Rocks. Both version are smooth and fast here (8800 Nvidia, XP)
Keep working on it, could be a great 4K too, but since you didn't dev something since 5 months, I think you'll manage to squeeze it in 1K in few days ;)

You were right. I enlisted some help from Pohar at Rebels and last night the intro dropped below 1k!
Title: Re: 1k raytracing
Post by: va!n on February 13, 2008
only white screen on notebook (ATI X1400)
Title: Re: 1k raytracing
Post by: benny! on February 13, 2008
Rocks. Both version are smooth and fast here (8800 Nvidia, XP)
Keep working on it, could be a great 4K too, but since you didn't dev something since 5 months, I think you'll manage to squeeze it in 1K in few days ;)

You were right. I enlisted some help from Pohar at Rebels and last night the intro dropped below 1k!

Great news  :clap:
Title: Re: 1k raytracing
Post by: taj on February 13, 2008
only white screen on notebook (ATI X1400)

You need PS 3.0...
Title: Re: 1k raytracing
Post by: taj on February 26, 2008
Hi,

PS3.0 Required

Here is the raytracer squeezed into 1k. Can people test and tell me if it works on their systems, if the colour is ok for you, if the speed is ok.

For those without PS3.0 (upgrade!)... I enclose an image.

Taj


Title: Re: 1k raytracing
Post by: benny! on February 26, 2008
@taj:

 :clap: awesome work. Runs very smooth here.
(GeForce 76ooGT - AMD Atholon 64 X2 Dual).

The colors fits definately to the name and wants me
to buy a loooot of chocolate. Damn - and I wanted
to lose pounds before summer  ::)
Title: Re: 1k raytracing
Post by: zawran on February 26, 2008
Runs 100% smooth without any problems at all and the color is fine. ( QuadCore 2.4ghz, Nvidia 8800GT SLI )
Title: Re: 1k raytracing
Post by: taj on February 26, 2008
OK thanks for testing guys, I've uploaded to Pouet and Intro Inferno. Phew glad that one is dnoe, actually started it in November!
Title: Re: 1k raytracing
Post by: Shockwave on February 26, 2008
That runs like a dream :)
I think it's your best 1kb ATI X1650
Title: Re: 1k raytracing
Post by: taj on February 26, 2008
Thanks shockie. I tend to agree - its certainly the most compressed with the biggest shader. I also worked very hard on colours here. Also found a new trick for passing a timer into the shader that saved valuable bytes. All in all I am quite satisfied with the result.


Oh I just did a video for people without PS3.0 cards...
http://www.youtube.com/watch?v=au1j1hV9H5U (http://www.youtube.com/watch?v=au1j1hV9H5U)
Title: Re: 1k raytracing
Post by: Voltage on February 27, 2008
Great work taj, very impressive. 1k real time sexy raytracer = envy

Runs at about 40-50fps (guess), and looks very nice.

NV 7300

Title: Re: 1k raytracing
Post by: taj on February 29, 2008
Thanks Voltage. The reception on pouet has been good too so I'm very pleased. Thanks for the CDC shockwave ;-).

Taj
Title: Re: 1k raytracing
Post by: Shockwave on February 29, 2008
Thanks for the CDC shockwave ;-).

It's me who thanks you for another great intro :)
Title: Re: 1k raytracing
Post by: Rbz on March 01, 2008
Runs fine here, another great work  :goodpost:

Did it use Directx or OpenGL ?
Title: Re: 1k raytracing
Post by: taj on March 01, 2008
Runs fine here, another great work  :goodpost:

Did it use Directx or OpenGL ?

What a great question! Initially I coded it in OGL and it was too big so I recoded in D3D ... and it was even bigger. Now I know my coding in D3D skills are 1/10 but nontheless it was bigger. The reason was OGL may have to bring in extensions but it has: glRect. I couldn't find any tiny equivalent in D3D, even after asking on this forum, that would fill the screen so I had to define a quad with four points using floats. Setting up D3D is bigger than OGL which is ... er nothing. In all, I couldn't find much difference.

Now heres a kicker. It was the case that ATi require a vertex shader to set glFragCoord correctly. It turns out that February 13th 2008 drivers from ATi seem to cure this problem. At least they do on my card. So it should be possible now to get the OGL framework down in size.

Title: Re: 1k raytracing
Post by: Rbz on March 01, 2008
Great news, I too still believe in Opengl glsl, and that's why I bought a book about glsl last week
Title: Re: 1k raytracing
Post by: taj on March 01, 2008
Great news, I too still believe in Opengl glsl, and that's why I bought a book about glsl last week

lol isnt it sad Rbraz that we can get excited about saving 20 bytes :-). Once you add glsl to your asm skills, I'm going to have learn asm !