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

Billboards were displayed upside down when drawn to a render texture #2180

Merged
merged 1 commit into from
Jan 19, 2016
Merged

Billboards were displayed upside down when drawn to a render texture #2180

merged 1 commit into from
Jan 19, 2016

Conversation

sketchyfun
Copy link
Contributor

Render texture's view transforms seem to be inverted, so when drawing
billboards, the 'up' vector given to set_look_at() is also inverted and
so the billboard gets drawn upside down.

…xture

Render texture's view transforms seem to be inverted, so when drawing
billboards, the 'up' vector given to set_look_at() is also inverted and
so the billboard gets drawn upside down.
@akien-mga
Copy link
Member

Can someone confirm the bug, and if so the fix?

@sketchyfun
Copy link
Contributor Author

Sorry for the late response, I figured this had been forgotten about until I received an email the other day!

Would you like me to provide an example that shows the bug?

@akien-mga
Copy link
Member

That would be great yes. I just discovered today that it's finally possible to attach zip files to GitHub issues, so you can attach your example here directly.

@sketchyfun
Copy link
Contributor Author

Unfortunately it won't let me attach a zip file, despite saying it's a supported type... Anyway, here's a dropbox link instead, hopefully that works: https://dl.dropboxusercontent.com/u/3292249/billboard_inverted.zip

you'll see that the Godot logo is the correct orientation in the editor, but when running the game it is flipped (when billboard mode is enabled and a viewport is being used)

Project settings -> Display -> stretch_mode is set to Viewport, this is when the problem occurs, or when a viewport node + render texture is used.

Let me know if you need anything else :)

@akien-mga
Copy link
Member

Thanks for the example project, it indeed makes a lot of sense. I'm not 100% sure if your proposed fix tackles the bug or just works around an issue in set_look_at, but at any rate it seems to be better than no fix, so I'll merge :)

akien-mga added a commit that referenced this pull request Jan 19, 2016
Billboards were displayed upside down when drawn to a render texture
@akien-mga akien-mga merged commit d67df42 into godotengine:master Jan 19, 2016
@sketchyfun sketchyfun deleted the SketchyFun branch January 19, 2016 21:51
@aaronfranke aaronfranke added this to the 2.0 milestone Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants