Hugo Locurcio 2a962929f3 Update demo files for Godot 4.2.1 (#1013) | il y a 9 mois | |
---|---|---|
.. | ||
screenshots | il y a 1 an | |
2d_in_3d.gd | il y a 1 an | |
2d_in_3d.tscn | il y a 1 an | |
README.md | il y a 1 an | |
ball.png | il y a 4 ans | |
ball.png.import | il y a 9 mois | |
default_env.tres | il y a 2 ans | |
icon.webp | il y a 1 an | |
icon.webp.import | il y a 1 an | |
left_pallete.png | il y a 4 ans | |
left_pallete.png.import | il y a 9 mois | |
pong.gd | il y a 2 ans | |
project.godot | il y a 9 mois | |
right_pallete.png | il y a 4 ans | |
right_pallete.png.import | il y a 9 mois | |
separator.png | il y a 4 ans | |
separator.png.import | il y a 9 mois |
A demo showing how a 2D scene can be shown within a 3D scene using viewports.
Language: GDScript
Renderer: Forward Mobile
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/129
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.