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

Added LightOn Shader Properties to Traffic Light #263

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

szylis
Copy link
Contributor

@szylis szylis commented Feb 7, 2024

This feature allows more customisation of the traffic light shaders. For example, in the case of traffic lights constructed in such a way, that there is a single bulb for red and green. And, to create a digital twin of such a construction in AWSIM, a custom shader has to be designed.

The changes include:

  • introduceing the new shader parameter in the TrafficLight.cs script: "_LightOn"
  • setting the value of this parameter when the light bulb state changes,

This allows to move the critical implementation of the light behaviour to be moved to the shader instead of implementing it in TrafficLight.cs.

@szylis szylis requested a review from mackierx111 February 7, 2024 14:54
Copy link
Collaborator

@mackierx111 mackierx111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a flag for shader is a good idea.. However, in the future We may move the AWSIM project from HDRP to URP to improve performance. If we move to URP, we may have to re-implement the shader as well, is that a problem?

see also #261

@mackierx111
Copy link
Collaborator

No problem for now, so I'll merge it.

@mackierx111 mackierx111 merged commit 8408a68 into main Feb 19, 2024
@szylis
Copy link
Contributor Author

szylis commented Feb 19, 2024

You are right, when we switch to URP, the shader have to be re-implemented. However, I believe this should not be a big problem.

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

Successfully merging this pull request may close these issues.

2 participants