-
Notifications
You must be signed in to change notification settings - Fork 415
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
Night Vision Light Sensetivity #5486
base: master
Are you sure you want to change the base?
Night Vision Light Sensetivity #5486
Conversation
if (lastColor != component.Color) | ||
{ | ||
lastColor = component.Color; | ||
if (_lightManager.LightSensitivity != 0) | ||
{ | ||
lastColor = new Color(component.Color.R * _lightManager.LightSensitivity, | ||
component.Color.G * _lightManager.LightSensitivity, | ||
component.Color.B * _lightManager.LightSensitivity, | ||
component.Color.A); | ||
} | ||
else | ||
{ | ||
lastColor = component.Color; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than baking this in this is better done on the content side or alternatively via event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than baking this in this is better done on the content side or alternatively via event.
wdym?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than baking this in this is better done on the content side or alternatively via event.
Could you explain how you see this? Sending an event here would be incredibly inefficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As opposed to calling GL.ClearColor twice in a row...?
The lighting cap is incredibly small anyway. Again, there's no reason you can't just update the lighting render target from content with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also another option is just drawing a texture to the LightRenderTarget in an overlay depending how you want to do it.
…o night-vision-light-sensitivity
Also, that solves a slightly different issue. we would still prefer to have local options for devs to adjust species sensitivity to light |
I still don't see why this can't just update the lighting render target from content. |
At this stage the only useful part of this I see is adding more customisation around what clearcolor is used but none of the other changes are necessary on the engine. |
e450d28
to
18ccd7a
Compare
Rewritten to use the event; is it better now? |
adds light sensetivity for night vision systems.
This not night vision, It's not about seeing people, it's about seeing everything, you can't draw everything on top.