• entries
32
50
• views
45920

# End of Spring Break update

1305 views

'eyyyy!

So indiedb is an interesting place, and it has a really weird ranking system. I went from rank 1778/24950 to 4911/24950 in about 24 hours, during all of which I was never even in the catalog of games. I think the ranking system is based on both time and site visitors, or something similar. But whatever, I'm cool with it if it helps me out.

In terms social networking, as of right now, I have:

• indiedb account: http://www.indiedb.com/games/contorted
• twitter page that I hardly ever use, but should: https://twitter.com/culdevu
• and I have this GameDev journal.

That should be enough. Right?

... right?

...

Anyways, I haven't really been working on the actual game the past couple days. I've fixed up the physics engine and decked it out with friction, with hopefully the last update I'll ever make to it.

For the most part, I've been pulling back out my old GPU pathtracer, and tried to fix it up in preparation for some voxel tracing, mainly because I've started getting jealous of Migi's screenshots. I found some old bugs in the specular lighting, I made the pathtracing loop more iterative and more readable. I still to this day, though, have no idea how you're supposed to make random numbers on the GPU right. The method I use currently is a slightly modified version of a code snippet from http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/uniform vec2 rand_1;uniform vec2 rand_2; ... float randShift_helper = 0.0;float rand(vec2 co){ co += rand_1; float c = 43758.5453; float dt= dot(co.xy, rand_2) + randShift_helper; float sn= mod(dt,3.14); float ret = fract(cos(sn) * c); randShift_helper = ret; return ret;}
As you can see, it's the familiar canonical GLSL rand function that you see everywhere, but got a couple constants switched out for my own uniforms (randomly generated every frame), and a splattering of ideas taken from normal LCRNG.

Though generating rays from this thing makes images that converge to things like

I'm thinking it has something to do with the way that , although the individual paths are random, each successive path bounce generates a ray that's deterministic, based on the parent ray (because of the LCG part).

ugh... GLSL, y u do this 2 me?

Anyways, gotta go. Have tons of homework due in Discrete in a couple days. That can get to be kinda important.

Thanks for reading and stuff!

If you don't mind I'll use that rand function! :)

Good luck with that homework!

##### Link to comment

Hahaha take it.

Pro tip: both rand_1 and rand_2 are in the range [0, 1), and multiply rand_2 by like 20 to get better results :P

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account