fix lightning bolts, ensure POM cannot interact with item frames and signs.

This commit is contained in:
Xonk
2023-06-28 15:34:23 -04:00
parent d46a423c50
commit e22f5f402d
6 changed files with 19 additions and 9 deletions

View File

@ -396,9 +396,12 @@ void main() {
vec3 viewVector = normalize(tbnMatrix*fragpos);
float dist = length(fragpos);
float maxdist = MAX_OCCLUSION_DISTANCE;
if(!ifPOM) maxdist = 0.0;
gl_FragDepth = gl_FragCoord.z;
if (dist < MAX_OCCLUSION_DISTANCE) {
if (dist < maxdist) {
float depthmap = readNormal(vtexcoord.st).a;
float used_POM_DEPTH = 1.0;
@ -448,6 +451,7 @@ void main() {
vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM) * color;
if(LIGHTNING > 0) Albedo = vec4(1);
// float ENDPORTAL_EFFECT = PORTAL > 0 ? EndPortalEffect(Albedo, fragpos, worldpos, tbnMatrix) : 0;
#ifdef WhiteWorld
@ -490,6 +494,7 @@ void main() {
else Albedo.a = 0.0;
#endif
//////////////////////////////// ////////////////////////////////
//////////////////////////////// NORMAL ////////////////////////////////
//////////////////////////////// ////////////////////////////////