Skip to content
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

r_locksurfaces #357

Closed
blendogames opened this issue Mar 17, 2021 · 7 comments
Closed

r_locksurfaces #357

blendogames opened this issue Mar 17, 2021 · 7 comments

Comments

@blendogames
Copy link

I was wondering if it would be possible to get the r_locksurfaces to work correctly. r_locksurfaces is a debug command used to pause the culling update, allowing one to move around to see what is and isn't being rendered.

I should note that r_locksurfaces does not work in retail Doom 3, and only seems to work in Quake 4.

@DanielGibson
Copy link
Member

DanielGibson commented Mar 21, 2021

I only get a black screen, only the HUD is still rendered. Is it the same for you?
(I'm not sure whether you meant "doesn't do anything useful at all" or "doesn't properly stop culling as it's supposed to")

@DanielGibson
Copy link
Member

So far I couldn't figure out what's going wrong :-/

Normally I'd use Renderdoc to figure out what the engine is trying to render and why it doesn't and work backwards from there, but unfortunately Renderdoc doesn't support OpenGL 1.x - and while it claims to support OpenGL ES2.0 and 3.x, I couldn't get d3wasm to work either (it's based on dhewm3 and r_locksurfaces behaves the same there), it seems to crash when capturing a frame..

One more thing I might try (when I find some time again) is trying out d3wasm+renderdoc on another Linux machine that doesn't have a nvidia GPU (the crash seems to happen in a nvidia lib).

(No, I can't use nvidia nsight either, newer versions don't support my GPU anymore and older versions don't seem to work, possibly because my driver version is too new for them. I hate computers.)

@blendogames
Copy link
Author

Yes, I'm also seeing the same black screen & HUD -- sorry, I didn't explain it very well! The player is still able to move around, but unfortunately the world is rendered as a black screen.

@DanielGibson
Copy link
Member

DanielGibson commented Jun 12, 2021

Can you test this branch: https://github.com/DanielGibson/dhewm3/tree/r_locksurfaces-dhewm3 ?
It seems to work for me ;)

Note:

  • Mirrors (and probably other kinds of subviews) might not do exactly what you expect (fixing this wouldn't be easy)
  • It always renders whatever would be visible from the "locked" position right now, so for example if you look towards a closed door, set r_lockSurfaces 1 and then walk towards the door so it opens, the stuff behind the door is visible (if it's visible from the original position with the opened door). If this is a problem, just use noclip so doors don't open.
  • You probably want to disable shadows (r_shadows 0 - is there some CVar for fullbright?), otherwise areas whichs polys are still rendered (but the corresponding lights are not) will just be black
  • r_useScissor is automatically disabled while r_lockSurfaces is enabled
  • I'd set r_clear 1 so not-rendered areas aren't black (which esp. in Doom3 itself isn't very meaningful) but purple
  • It's probably still a good idea to additionally use r_showTris 1 (with r_useScissor 0) to check what's really rendered

@DanielGibson
Copy link
Member

Windows binaries of that branch: dhewm3-1.5.2pre-win32-locksurfaces.zip

@blendogames
Copy link
Author

r_locksurfaces now works great! Amazingly helpful feature, this is fantastic.

DanielGibson added a commit to DanielGibson/dhewm3 that referenced this issue Jun 15, 2021
@DanielGibson
Copy link
Member

Awesome, thanks for testing!

Merged it into the master branch.

rorgoroth pushed a commit to rorgoroth/dhewm3 that referenced this issue Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants