godot-demo-projects/viewport/3d_in_2d
Hugo Locurcio fe6103256a
Allow hiDPI in all demos that support multiple resolutions
This is required to benefit from crisp display on hiDPI monitors.
This also fixes issues related to fullscreen and input handling
when using an hiDPI display on Windows.
2020-10-01 00:56:12 +02:00
..
screenshots Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
3d_in_2d.gd Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -05:00
3d_in_2d.tscn Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -05:00
README.md Link to the asset library from the README of each demo 2020-09-10 15:37:10 -04:00
icon.png Optimize all images using `oxipng -o6 --strip all --zopfli` 2019-06-11 16:40:50 +02:00
icon.png.import Handle multiple resolutions in most demos 2020-01-28 19:08:03 +01:00
project.godot Allow hiDPI in all demos that support multiple resolutions 2020-10-01 00:56:12 +02:00
robot_3d.gd Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -05:00
robot_3d.tscn Update 3D in 2D demo to Godot 3.1.2 2020-01-31 15:15:57 -05:00
robot_demo.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
robot_demo.png.import Handle multiple resolutions in most demos 2020-01-28 19:08:03 +01:00

README.md

3D in 2D

A demo showing how a 3D scene can be shown within a 2D one using viewports.

Language: GDScript

Renderer: GLES 2

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/128

How does it work?

The 3D robot is rendered to a custom Viewport node rather than the main Viewport. In the code, get_texture() is called on the Viewport to get a ViewportTexture, which is then assigned to the sprite's texture.

Screenshots

Screenshot