Browse Source

Add README files to Viewport demos

Aaron Franke 5 years ago
parent
commit
f2a18910aa

+ 20 - 0
viewport/2d_in_3d/README.md

@@ -0,0 +1,20 @@
+# 2D in 3D
+
+A demo showing how a 2D scene can be shown within a 3D one using viewports.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+The Pong game is rendered to a custom
+[`Viewport`](https://docs.godotengine.org/en/latest/classes/class_viewport.html)
+node rather than the main Viewport. In the code,
+`get_texture()` is called on the Viewport to get a 
+[`ViewportTexture`](https://docs.godotengine.org/en/latest/classes/class_viewporttexture.html),
+which is then assigned to the quad's material's albedo texture.
+
+## Screenshots
+
+![Screenshot](screenshots/pong.png)

+ 0 - 0
viewport/2d_in_3d/screenshots/.gdignore


BIN
viewport/2d_in_3d/screenshots/pong.png


+ 20 - 0
viewport/3d_in_2d/README.md

@@ -0,0 +1,20 @@
+# 3D in 2D
+
+A demo showing how a 3D scene can be shown within a 2D one using viewports.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+The 3D robot is rendered to a custom
+[`Viewport`](https://docs.godotengine.org/en/latest/classes/class_viewport.html)
+node rather than the main Viewport. In the code,
+`get_texture()` is called on the Viewport to get a 
+[`ViewportTexture`](https://docs.godotengine.org/en/latest/classes/class_viewporttexture.html),
+which is then assigned to the sprite's texture.
+
+## Screenshots
+
+![Screenshot](screenshots/3d_in_2d.png)

+ 0 - 0
viewport/3d_in_2d/screenshots/.gdignore


BIN
viewport/3d_in_2d/screenshots/3d_in_2d.png


+ 11 - 1
viewport/3d_scaling/README.md

@@ -1,4 +1,4 @@
-# 3D scaling
+# 3D Viewport Scaling
 
 This demo shows how to scale the 3D viewport rendering without affecting
 2D elements such as the HUD. It also demonstrates how to toggle filtering
@@ -9,3 +9,13 @@ the main game area and a non-pixel-art viewport for HUD elements.
 
 ViewportContainer can also be used to display a viewport in a GUI, but it
 doesn't offer the ability to enable filtering.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/high.png)
+
+![Screenshot](screenshots/low.png)

+ 0 - 0
viewport/3d_scaling/screenshots/.gdignore


BIN
viewport/3d_scaling/screenshots/high.png


BIN
viewport/3d_scaling/screenshots/low.png


+ 39 - 14
viewport/dynamic_split_screen/README.md

@@ -1,24 +1,49 @@
-# The project
-This sample project showcases an implementation of dynamic split screen, also called Voronoi split screen, using the [Godot engine](https://godotengine.org).
+# Dynamic Split Screen
 
-# Dynamic split screen
-A dynamic split screen system displays a single screen when the two players are close but a splitted view when they move apart.
+This sample project showcases an implementation of dynamic
+split screen, also called Voronoi split screen.
 
-The splitting line can take any angle depending on the players' position, so it won't be either vertical or horizontal.
+Language: [GDSL](https://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/shading_language.html) and GDScript
+
+Renderer: GLES 2
+
+Note: An HTML5 export is testable
+[here](https://benjaminnavarro.github.io/godot_dynamic_split_screen/index.html).
+
+## Details
+
+A dynamic split screen system displays a single screen when
+the two players are close but a splitted view when they move apart.
+
+The splitting line can take any angle depending on the players'
+position, so it won't be either vertical or horizontal.
 
 This system was popularized by the Lego videogames.
 
-# How it works
-Two cameras are placed inside two separate viewports and their texture, as well as some other parameters, are passed to a shader attached to a TextureRect filling the whole screen.
+## How it works
+
+Two cameras are placed inside two separate viewports and their
+texture, as well as some other parameters, are passed to a
+shader attached to a TextureRect filling the whole screen.
+
+The `SplitScreen` shader, with the help of the `CameraController`
+script, chooses wich texture to display on each pixel to
+achieve the effect.
+
+The cameras are placed on the segment joining the two players,
+either in the middle if they're close enough or at a fixed
+distance otherwise. 
 
-The `SplitScreen` shader, with the help of the `CameraController` script, chooses wich texture to display on each pixel to achieve the effect.
+## How to use it
 
-The cameras are placed on the segment joining the two players, either in the middle if they're close enough or at a fixed distance otherwise. 
+Open and launch the project inside the Godot engine and then
+you can use WASD keys to move the first player and IJKL keys
+to move the second one.
 
-# How to use it
-Open and launch the project inside the Godot engine and then you can use WASD keys to move the first player and IJKL keys to move the second one.
+The `Cameras` node has parameters to tune the distance at
+which the screen splits and also the width and color of
+the splitting line.
 
-The `Cameras` node has parameters to tune the distance at which the screen splits and also the width and color of the splitting line.
+## Screenshots
 
-# Try it out
-An HTML5 export is testable [here](https://benjaminnavarro.github.io/godot_dynamic_split_screen/index.html).
+![Screenshots](screenshots/splitscreen.png)

+ 0 - 0
viewport/dynamic_split_screen/screenshots/.gdignore


BIN
viewport/dynamic_split_screen/screenshots/splitscreen.png


+ 12 - 0
viewport/gui_in_3d/README.md

@@ -0,0 +1,12 @@
+# GUI in 3D
+
+A demo showing a GUI instanced within a 3D scene using viewports,
+as well as forwarding mouse and keyboard input to the GUI.
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## Screenshots
+
+![Screenshot](screenshots/gui.png)

+ 0 - 0
viewport/gui_in_3d/screenshots/.gdignore


BIN
viewport/gui_in_3d/screenshots/gui.png


+ 11 - 0
viewport/screen_capture/README.md

@@ -0,0 +1,11 @@
+# Screen Capture
+
+An example showing how to take screenshots of the screen. 
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/capture.png)

+ 0 - 0
viewport/screen_capture/screenshots/.gdignore


BIN
viewport/screen_capture/screenshots/capture.png


+ 1 - 1
visual_script/multitouch_view/README.md

@@ -10,4 +10,4 @@ Note: There is a GDScript version available [here](https://github.com/godotengin
 
 ## Screenshots
 
-![Screenshot](screenshots/multitouch.png)
+![Screenshot](../../misc/multitouch_view/screenshots/multitouch.png)