pouët.net

Go to bottom

Problem with RayMarching using DistanceFunctions when applying Twist-Distortion.

category: general [glöplog]
oh, btw, the broken function still terminates very swiftly
oh, btw, the source is here for your leissure.


It's my first C++ program from scratch, but it's not very big, so it shouldn't be too troublesome to go through - I think the problem has been boiled down to the single function which I just posted, though.
its just the pipeline to the gfx-card...

as what you want to do is gfx-stuff do it on gpu instead of cpu !
( sounds dumb, but i am...maybe !! )

your bottleneck most-likely is some weak FSB or alike ;)

get into shaders ! it´ll be fun, i promise !!

once you see what shaders offer, you´ll just laugh about what some ppl including me did so far !
Störtebeker, I know I'm shooting myself a little in the foot by doing it on CPU, but I'd still like to have my basics working before I migrate to a totally new territory.
(assuming that was for me)
I found my bug: I was taking a pointer to the camera position vector in my render function, and I was manipulating that vector inside of the function instead of making a local copy. Duh. Fixed.
most common bug, i had to learn aswell these weeks !
just suxx if you stumble upon sth like this !
->i did everything right, but why does Raybrush Marchwood bug ?
Störte: ...Raybrush Marchwood?

I'm popping to bed satisfied now:
BB Image
if I see one more raytraced / raymarched sphere today I will shoot myself in the head with an L.A.W. :/
added on the 2009-09-23 23:33:53 by decipher decipher
cool.
BB Image
Sorry, couldn't resist. Interesting topic btw
BB Image
added on the 2009-09-24 00:20:55 by bartman bartman
he's the man :)
BB Image
added on the 2009-09-24 04:25:13 by bdk bdk
he isn't, I don't see any caustics over him when the spheres cast shadows...
added on the 2009-09-24 08:54:12 by xTr1m xTr1m
ffs spheres! grr...
added on the 2009-09-24 09:37:16 by decipher decipher
A lego-marched sphere for you:

BB Image
added on the 2009-09-24 10:07:06 by Rob Rob
Beautiful!
added on the 2009-09-24 10:33:30 by trc_wm trc_wm
here's are some spheres in disguise.
BB Image

current state of my ray-marcher: 1280x720 @ 30fps with 3 lights, dynamic surfaces, soft-shadows and ambient-occlusion :)
added on the 2009-09-25 21:10:46 by xortdsc xortdsc
cool
added on the 2009-09-26 01:17:12 by texel texel
Raytrace these spheres right here.
Now go and make 4k from this. :)
added on the 2009-09-26 01:49:53 by KK KK
what KK said (this is not gamedev, but the demoscene!)

Nice image thou
added on the 2009-09-26 11:29:12 by iq iq
CUDA in 4k? iq you've tried that, is it small enough?
added on the 2009-09-26 12:04:00 by xTr1m xTr1m
CUDA is nonstandard. so I doubt it qualifies as a 4k root.
added on the 2009-09-26 12:07:52 by decipher decipher
I don't think there will be any problem porting this to pixel shader. Also, probably within 1 year or even sooner most compomachines will be able to run DX11 and compute shaders (will 2010 or 2011 be a year of compute shader 4k intros?).
added on the 2009-09-26 12:28:58 by KK KK
compute shaders in a year? so what is it that GPU's do today then?

login

Go to top