-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mod_Q1BSP_AssignNoShadowSkySurfaces allows rtlights to go through sky brushes #220
Comments
This seems to resolve the issue: diff --git a/model_brush.c b/model_brush.c
index 69082e61..39019c0f 100644
--- a/model_brush.c
+++ b/model_brush.c
@@ -3275,7 +3275,7 @@ static void Mod_Q1BSP_AssignNoShadowSkySurfaces(model_t *mod)
// check if the point behind the surface polygon is SOLID or SKY contents
VectorMAMAM(0.5f, surface->mins, 0.5f, surface->maxs, -0.25f, mod->surfmesh.data_normal3f + 3*surface->num_firstvertex, center);
contents = Mod_Q1BSP_PointSuperContents(mod, 0, center);
- if (!(contents & SUPERCONTENTS_SOLID))
+ if (contents & SUPERCONTENTS_SOLID)
surface->texture = surface->texture->skynoshadowtexture;
}
} |
I'd be super, super careful with this one. There was a "dynamic light fix" at Quakesrc.org in ancient times that stopped light bleeding through walls. And in a few cases the results were great. But there aren't any Quake engines using the fix because it created several other inconsistent problems. |
This isn't really about dynamic light bleeding through walls, it's about sky surfaces not blocking realtime light, as if the sky surfaces were not there at all. |
I am interested in trying out what you've done, I think it is cool that you investigate these things. I'm going to make the cvar and run around some maps and look at stuff. |
I can't see the image so I'm not sure what you're referring to. |
It was a quote of your 2nd image in this thread. The pic of the Quad symbol with the shadow. In the upper right corner, the real-time light editor panel is cut-off and you can only see part of it. |
When this function is allowed to run, any sky surface with a void behind it will be ignored when an rtlight is casting shadows, which can cause the light to shine into parts of the map through the back of other nearby surfaces.
In this screenshot the light is hitting the top of the stone walls through the back of the stone ceiling
Disabling the
Mod_Q1BSP_AssignNoShadowSkySurfaces
function works to fix this, however this then breaks e1m5.The text was updated successfully, but these errors were encountered: