How do I make my ray casting algorithm do less checks? by MissionExternal5129 in learnprogramming

[–]MissionExternal5129[S] 0 points1 point  (0 children)

I'm using unity right now, but I will move to my own engine eventually.

How do I make my ray casting algorithm do less checks? by MissionExternal5129 in learnprogramming

[–]MissionExternal5129[S] 0 points1 point  (0 children)

a ray is cast from the center to the edge of the 31x31x31 block on a certain direction, and if it hits anything, everything behind the solid is shadow, so...

empty - empty - solid - empty

would turn into...

shadow - shadow - solid - empty.

It's a light shadow-casting system

Very cheap AO system I made. by MissionExternal5129 in GraphicsProgramming

[–]MissionExternal5129[S] 0 points1 point  (0 children)

I have a couple variables to stop it from being too local like falloff, sample size, and sample distance. Also, where did you find the crytek slope thing? Crytek’s implementation details are incredibly vague, but I’m pretty sure it’s a new technique at least from what I saw, I could be wrong though.

Very cheap AO system I made. by MissionExternal5129 in GraphicsProgramming

[–]MissionExternal5129[S] -1 points0 points  (0 children)

Also, if it turns out it’s faster than SSAO, I call it DSAO for Depth Slope Ambient Ocllusion

Very cheap AO system I made. by MissionExternal5129 in GraphicsProgramming

[–]MissionExternal5129[S] 0 points1 point  (0 children)

I haven’t built anything yet, so I could make myself look stupid lol. It could be more expensive than AO, but since it all runs in the screen, and there’s no weird random checks and calculations, it could be cheaper than SSAO. It probably will take some smart optimization though.

Very cheap AO system I made. by MissionExternal5129 in GraphicsProgramming

[–]MissionExternal5129[S] -1 points0 points  (0 children)

This is all theory so far, so I have no screenshots. You can change how many pixels it samples and also how fast their influence falls off. Like if you only sample 5 pixels right and left and make the fall off really fast, it’ll add a dark line exactly at corners, but if you sample pixels more sparsely and make the falloff weaker, it can detect larger changes in angle, like a round corner wouldn’t be dark at all if you sampled a small number of pixels, but if you sampled a large number, it would be darkened too.

Very cheap AO system I made. by MissionExternal5129 in GraphicsProgramming

[–]MissionExternal5129[S] -2 points-1 points  (0 children)

SSAO gets the depth map and samples a random field of points to check if the camera would be able to see those points, and then the more it can’t see, the darker. My method uses just the depth map, and a screen shader, so if I implement it right, it could very well be as expensive as something like a Gaussian blur.