Actually, I think that Unity has a built-in achievement system that will link with at least Android/ IOS, I suspect that it might work well with Steam as well.
It seems impossible to remove this sort of perspective aliasing when the surface is nearly parallel to the light direction.
I have tested several different shadow acne removing techniques:
Constant bias doesn't work: Introduces peter panning on biases large enough to remove the issue
Slope-s...
Instead of checking whether the depth at that pixel is less than the depth in the sun's perspective depth map, try checking if the current depth plus some small amount is less than the depth at the sun's depth map
That makes it disappear
What happens basically, is that floating points aren't very accurate, and the faces think they are obstructed by themself
@Blue Do you have diffuse shading BTW? The 2 supposed to be combined to result in a nicer effect
Because you recalculate the depth from the depth buffer, thus you make it innaccurate
Depth maps have a higher float density closer to the camera to make z-fighting less visible
Your sun is a certain distance away from the camera, so it becomes pretty inaccurate
E.g. The sun's depth buffer think a certain fragment is at 10.653, but the fragment is at 10.652 on the z coordinate, thus it thinks it's behind something (I exaggerated a bit)
@BlueBug Yeah. gamedev.SE "tolerates" graphic questions that are frequent to game dev or specific to game engines but generic rendering questions should go to computergraphics.SE
@BlueBug essentially, if it's "how can I do <computer graphics technique X> in Unity3D" or "in Unreal" it can go in gamedev.SE If it's directly in OpenGL, DirectX, or software rendering, it should go in computergraphics.SE
@BlueBug I don't think there's a one size fits all solution, but there are lots of solutions. Using a linearly blendable shadow format like variance, exponential, or convolution allows you to use texture filtering hardware to do basic filtering, and also enables you to pre-filter with regular blur kernels on the shadow map itself
If you don't want to use a fancy format for depth storage, then you can do things like PCF which is basically just shadow testing a few nearby points and blending the binary shadow samples to get a smoother test
If you want to get extra baller with it, you can do PCSS which basically is using the shadow map first to judge how far away the shadow receiver is from the shadow caster by sampling nearby points, and then using that distance to control blur amount. It produces way more realistic shadows that start hard on contact and then become blurry as the distance increases, like real shadows
I like that approach the most, and to implement variable sized blur efficiently, I like to use a linearly blendable format (I prefer ESM) and take the integral of your image data, which then allows you to evaluate any size box average filter using only 4 texture samples
oh wait, nope. fingers are a bit messed up.. close enough
Let's see if YT accepts that 1080p60 video capture...
It'd look better if I added specular maps but that'd be a lot of extra work having to bake a 3rd texture map for everything, and then it's also a 3rd texture the GPU has to deal with unless I merge it into the normal map.
@BlueBug It can be cheap but it's not free. PCF doesn't require any pre-processing but does require more shadow samples, while pre-filtering requires evaluating a blur kernel on the shadowmaps every time, but then costs nothing extra to sample
@Bálint This is exactly what the "bias" he referred to is. He's already doing that.
And it's not really a very good solution because it makes all the shadows creep over a small distance and only moves the problem to heavier angles
In order to handle grazing angles well that way, you have to have an unacceptable amount of shift in the overall shadow position, so objects on the ground look weird from their shadow being offset
You can help the situation a bit by measuring the surface normal and using that to compute a tighter bias for each sample
I'm trying to make a launcher for a game I like that compiles the vanilla version and the mods into one launcher. I want to make it so I can choose between the versions, maybe with a rudimentary GUI. The original versions of the game are in Java, but I'm converting them to .EXE with Launch4j, and...