diff --git a/shaders/dimensions/all_particles.fsh b/shaders/dimensions/all_particles.fsh index 4a102df..7259fbb 100644 --- a/shaders/dimensions/all_particles.fsh +++ b/shaders/dimensions/all_particles.fsh @@ -345,7 +345,7 @@ void main() { float maxdist = MAX_OCCLUSION_DISTANCE; if (dist < maxdist) { - float depthmap = readNormal(texcoord.st).a; + float depthmap = readNormal(clamp(texcoord.st, texcoordam.st, texcoordam.st + texcoordam.pq)).a; float used_POM_DEPTH = 1.0; if ( viewVector.z < 0.0 && depthmap < 0.9999 && depthmap > 0.00001) { diff --git a/shaders/dimensions/all_solid.fsh b/shaders/dimensions/all_solid.fsh index c262a5b..26a9b6b 100644 --- a/shaders/dimensions/all_solid.fsh +++ b/shaders/dimensions/all_solid.fsh @@ -445,7 +445,7 @@ void main() { if (falloff > 0.0) #endif { - float depthmap = readNormal(data_in.texcoord.st).a; + float depthmap = readNormal(clamp(data_in.texcoord.st, data_in.texcoordam.st, data_in.texcoordam.st + data_in.texcoordam.pq)).a; float pomdepth = POM_DEPTH * falloff; if ( viewVector.z < 0.0 && depthmap < 0.9999 && depthmap > 0.00001) {