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

LightEmitter visibility inconsistency #436

Open
GLS-SSV opened this issue Feb 29, 2024 · 3 comments
Open

LightEmitter visibility inconsistency #436

GLS-SSV opened this issue Feb 29, 2024 · 3 comments

Comments

@GLS-SSV
Copy link
Contributor

GLS-SSV commented Feb 29, 2024

In MOGE, the current default for the visibility of LightEmitter is VIS_EXTERNAL, as seen visually and by calling GetVisibility(). Result: lights do not illuminate objects when view is non-external. This changed from the 2016 version, when lights were always visible.
In D3D9, the current default is is VIS_EXTERNAL, as indicated by GetVisibility(), but the lights are always visible.

@jarmonik
Copy link
Contributor

jarmonik commented Mar 6, 2024

This is from main branch ? I have tested that the "engine/exhaust" light in DeltaGlider doesn't effect in VC (D3D9). If there's a problem then I would need to be able to reproduce it. Didn't find anything obvious in the code, it looks ok. VIS_EXTERNAL is in deed the default setting and there's no change to it in GitHub code base. If it has been VIS_ALWAYS before then the change is older than OpenOrbiter.

@GLS-SSV
Copy link
Contributor Author

GLS-SSV commented Apr 4, 2024

I'm sorry for not explaining this better (and the delay). I identified a difference in behaviour between 2016 and 2024, when a LightEmitter is created and SetVisibility() is not called.
In 2016 MOGE the lights illuminate when viewed from the vc, but in 2024 they don't illuminate. It seems the VIS_EXTERNAL default is now being enforced.
In D3D9, the VIS_EXTERNAL is also indicated as default, but the lights always illuminate when viewed from the vc. It seems the VIS_EXTERNAL is not being enforced.

Forgetting the 2016 version, currently (2024) there is a difference in results between MOGE and D3D9 when SetVisibility() is not called.

I used a version from main, but i don't remember more... could try with something more recent.

@jarmonik
Copy link
Contributor

jarmonik commented Apr 5, 2024

I still can't make much sense out of this. According to the current code this should be the behavior:

In D3D9 and MOGE default vismode is VIS_EXTERNAL.

If the vis mode is:
VIS_EXTERNAL: MOGE and D3D9 will lit meshes rendered during exterior pass.
VIS_COCKPIT: MOGE and D3D9 will lit meshes rendered during interior pass.
VIS_ALWAYS: MOGE will lit meshes only during exterior pass, D3D9 will lit meshes during both passes.

So, based on the code VIS_ALWAYS seems to work differently. But I can't find connection to VIS_EXTERNAL and SetVisibility().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants