Reflections artifacts
e2002e opened this issue · 1 comments
e2002e commented
When ssr is on, parts of objects that reflect but are not directly touching the object they reflect on have strange artifacts:
This most probably comes from this part of the code:
float getDeltaDepth(const vec3 hit) {
depth = textureLod(gbufferD, getProjectedCoord(hit), 0.0).r * 2.0 - 1.0;
vec3 viewPos = getPosView(viewRay, depth, cameraProj);
return viewPos.z - hit.z;
}
It's telling the rayCast function whether we'r hitting an object or not. It must be tweaked in some way so that it doesn't return a positive value in the middle of nowhere.
e2002e commented
this doesn't seem to happen with the official version.