-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix rgb camera for mac #6
Conversation
- only 8-bit colors for mac - use glsl 330 for mac
@maxime-desroches Should this be merged into main and then to minimal, or straight into minimal? |
@maxime-desroches can you check this out? Looks like it's holding up macOS metadrive support |
Thanks for the PR. Once this is cleanup, I will merge this into main and create the new minimal wheel (and re-open your openpilot PR) |
@@ -39,15 +40,17 @@ def _setup_effect(self): | |||
self.manager = FilterManager(self.buffer, self.cam) | |||
fbprops = p3d.FrameBufferProperties() | |||
fbprops.float_color = True | |||
fbprops.set_rgba_bits(16, 16, 16, 16) | |||
# fbprops.set_rgba_bits(16, 16, 16, 16) |
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.
Why removing this?
@@ -265,7 +265,7 @@ def _setup_tonemapping(self): | |||
|
|||
fbprops = p3d.FrameBufferProperties() | |||
fbprops.float_color = True | |||
fbprops.set_rgba_bits(16, 16, 16, 16) | |||
# fbprops.set_rgba_bits(16, 16, 16, 16) |
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.
Why removing this?
metadrive/engine/core/engine_core.py
Outdated
loadPrcFileData("", "color-bits 8 8 8") | ||
loadPrcFileData("", "alpha-bits 8") |
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.
16 bits RGBA works fine on my mac. What are you testing this on?
Thanks for the review. Yes, manually setting 8-bit RGBA for Mac is indeed not needed anymore with the PBR pipeline working again, I missed that. |
* fix rgb camera for mac - only 8-bit colors for mac - use glsl 330 for mac * macos 4x antialiasing * no more need to enforce 8-bit colors on mac * more samples * what is this, 1990? --------- Co-authored-by: Maxime Desroches <[email protected]>
What changes do you make in this PR?
Make the
RGBCamera
work on MacOS:python -m metadrive.examples.drive_in_single_agent_env --observation rgb_camera
Changes for MacOS:
Request only 8-bit colorsRequired for completing: commaai/openpilot#33207