cnlohr / noeuclid

Non-euclidean GPU Raytraced Game
BSD 3-Clause "New" or "Revised" License
644 stars 48 forks source link

Needs to look more modern. #11

Open phiresky opened 9 years ago

phiresky commented 9 years ago

Like some reddit user said.

cnlohr commented 9 years ago

Ambient occlusion would be really cool - and totally implementable in the C end, as the "brightness" is something I believe we have room for in the data that gets passed into the shader. I have never been able to write an ambient occlusion engine, though and the thought of such terrifies me.

A second thought is that we could attach another 3D buffer that could contain brightness, and information to do standard texture mapping. It would be neat to do 2D textures. I wonder if we could take advantage of that in a game - i.e. abusing a dynamic 2d texture as a game element. Imagine having to push a ball around, but the ball exists only as a object on the surface of a wall! Good grief this could get UNBELIEVABLY ESOTERIC!

I am continually worried about adding textures, etc since things are already teetering on the edge of what the hardware can do.

As far as other things that we can do to improve overall feel - there are a number of steps we can take in "pass3.frag" that would enable us to do some very cool things. I originally had crepscular rays working (though there is no analogue for the now, non-euclidean engine). Vignetting, noise, color correction, etc. are all things that can be done in pass3.frag.

As far as better/more noise functions go: Calculating 3D Perlin noise using cubes is very expensive. I wanted to switch to a tetrahedral 3D noise generation, but my brain isn't good enough to do that. I had a difficult enough time ripping off my old professor's cubic Perlin noise! Thanks, Olano!

phiresky commented 9 years ago

Textures would obviously be very nice.

I am continually worried about adding textures, etc since things are already teetering on the edge of what the hardware can do.

Yes, is there any way to simplify the shaders? Maybe move parts of it to the CPU C++? I haven't looked at them because I can't really shader.. By the way, it would be nice if you could put a bit more detailed engine about how the rendering/shader passes work into the readme.

cnlohr commented 9 years ago

I really don't think it's feasible to put much more in C++ and away from the shaders. I wish I could!!! It is really depressing how complicated they ended up being. Consider they have to march through the grid, handle changes in density, when they run into an offset-grid block that may have something in it, they have to linearly step through calculating a density function, if there is a hit, they have to use a binary search to find that point, if not, they have to keep marching along. Oh, and they have to handle warping. X.X

About documentation - that I certainly can do this weekend. I have a lot of notes all over the place, but nothing centralized.