godot-demo-projects/viewport/2d_in_3d
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
2D_in_3D.gd Misc fixes and tweaks to many demos 2020-06-27 21:07:49 -04:00
2D_in_3D.tscn Replace built-in scripts and delete strange "e" scripts 2021-06-21 12:33:42 -04:00
README.md Link to the asset library from the README of each demo 2020-09-10 15:37:10 -04:00
ball.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
ball.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
default_env.tres Clean up unused and outdated environment files 2020-06-27 20:58:19 -04:00
icon.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
icon.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
left_pallete.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
left_pallete.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
pong.gd Format files using updated file_format.sh 2020-10-01 14:23:54 -04:00
project.godot Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
right_pallete.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
right_pallete.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00
separator.png Optimize PNG images using oxipng 2020-08-16 17:48:38 -05:00
separator.png.import Update demos to Godot 3.4 2021-11-05 11:48:47 -05:00

README.md

2D in 3D

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

Language: GDScript

Renderer: GLES 2

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

How does it work?

The Pong game 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 quad's material's albedo texture.

Screenshots

Screenshot