j0zzz / JoeQuake

Quake engine mod targeted for speedrunning
https://j0zzz.github.io/JoeQuake/
55 stars 10 forks source link

Issue with mdls flickering black #83

Closed Flecked42 closed 1 year ago

Flecked42 commented 1 year ago

This is from a dev build, not the public 17.4.

https://user-images.githubusercontent.com/90434262/210886752-068db999-a881-42bb-958d-1a0dddba209d.mp4

I assume its from the swinging blades fix https://github.com/j0zzz/JoeQuake/commit/fdd634b42e23751af03f56397b866379b893af97

Flecked42 commented 1 year ago

Maybe these commits could help

https://github.com/Novum/vkQuake/commit/496641026486b654c9ab69188327429093c48d39 https://github.com/andrei-drexler/ironwail/commit/ed0e44fbed3b0f25c602666a4d312150bb1105bd

matthewearl commented 1 year ago

I'm having trouble repro'ing this, even with a save state provided by @Flecked42 . Having said that, it looks like ambientlight and shadelight are not set if the trace from the origin succeeds:

    if (!R_LightPoint(ent->origin))
    {
        vec3_t lpos;
        VectorCopy(ent->origin, lpos);
        lpos[2] += ent->model->maxs[2] * 0.5f;
        ambientlight = shadelight = R_LightPoint(lpos);
    }

Maybe this could be the cause?

matthewearl commented 1 year ago

Never mind, I do see it with vertex lighting off (gl_vertexlights 0). I've raised a PR which appears to fix the issue: https://github.com/j0zzz/JoeQuake/pull/84

j0zzz commented 1 year ago

Thanks a lot Matt!

sezero commented 1 year ago

Is the issue present in quakespasm? CC: @andrei-drexler

Flecked42 commented 1 year ago

No I don't believe so. I've checked QS and didnt notice it.