godot-demo-projects/viewport/3d_in_2d
Aaron Franke b7e0a470c7
Update demos to Godot 3.4
2021-11-05 11:48:47 -05:00
..
screenshots Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
3d_in_2d.gd Simplify 3D in 2D demo 2020-12-06 22:00:51 -05:00
3d_in_2d.tscn Simplify 3D in 2D demo 2020-12-06 22:00:51 -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
icon.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
project.godot Allow 3D demos to fallback to GLES2 2021-11-05 09:57:51 -05:00
robot_3d.gd Simplify 3D robot in the 3D in 2D demo 2021-06-06 23:28:53 -04:00
robot_3d.tscn Replace built-in scripts and delete strange "e" scripts 2021-06-21 12:33:42 -04:00
robot_demo.png Simplify 3D in 2D demo 2020-12-06 22:00:51 -05:00
robot_demo.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05: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