godot-demo-projects/viewport/2d_in_3d
ShatteredReality b4c73f4888
Fix README links to asset library (#1078)
This updates all links to point to the 4.2 demos instead of the 3.5 ones.

Co-authored-by: A Thousand Ships (she/her) <96648715+AThousandShips@users.noreply.github.com>
2024-06-24 19:29:58 +02:00
..
screenshots
2d_in_3d.gd Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
2d_in_3d.tscn Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
README.md Fix README links to asset library (#1078) 2024-06-24 19:29:58 +02:00
ball.png
ball.png.import
default_env.tres
icon.webp
icon.webp.import
left_pallete.png
left_pallete.png.import
pong.gd Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
project.godot Use static typing in all demos (#1063) 2024-06-01 12:12:18 +02:00
right_pallete.png
right_pallete.png.import
separator.png
separator.png.import

README.md

2D in 3D

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

Language: GDScript

Renderer: Compatibility

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

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