Skip to content

mac skybox/terrain shader path renders skewed textures in sim #872

@utkarshgill

Description

@utkarshgill

bug

on mac, metadrive shader path renders sky textures skewed/folded (arrow-like artifact). this is visible in openpilot sim and reproducible with metadrive shader files in site-packages.
companion openpilot issue: commaai/openpilot#37526

observed files

metadrive/shaders/skybox_mac.frag.glsl
metadrive/shaders/skybox_mac.vert.glsl
metadrive/shaders/terrain.frag.glsl

screenshots

before (skewed sky/texture folding):
Image

after local shader patch (artifact removed):
Image

local patch that removes artifact

  • update mac skybox shaders to modern path equivalent (#version 150, in/out, textureLod)
  • replace deprecated texture2D(...) usage in terrain sampling path with texture(...) where needed for core profile behavior

notes

there is also a separate bgra channel-order bug in openpilot camera extraction. that is independent and on openpilot side. this issue is only about shader skew/folding on mac.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions