From d52d760b1864e5e7effa664cc9e8d82c40a2b56d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojte=CC=8Cch=20Struha=CC=81r?= Date: Tue, 20 May 2025 21:22:18 +0200 Subject: [PATCH] Update plugin --- addons/portals/README.md | 45 ++++++++++++++++++--------------------- addons/portals/plugin.cfg | 6 +++--- 2 files changed, 24 insertions(+), 27 deletions(-) diff --git a/addons/portals/README.md b/addons/portals/README.md index 6934337..682783e 100644 --- a/addons/portals/README.md +++ b/addons/portals/README.md @@ -4,28 +4,26 @@ This plugin enables you to easily create seamless plugins. ## Documentation -For documentation about `Portal3D`, see the portal script itself. -Everything is properly documented and viewable in the default -documentation window. Click _Script > Search Help_ and type -"Portal3D" in there. +For documentation about `Portal3D`, see the portal script itself. Everything is properly documented +and viewable in the default documentation window. Go to the script editor, click _Search Help_ in +the top bar and search for "Portal3D". For everything else, there is this README. -## Materials +## Guides -### Portals +### Customize portals in the editor -The portal mesh has a custom shader material assigned to it at runtime, -(defined in `materials/portal_shader.gdshader`), but in editor, it uses -a regular material -- find it at `materials/editor-preview-portal-material.tres`. -You can edit this material to customize how portals look in the editor -(in case the default gray color blends in too much). +The portal mesh has a custom shader material assigned to it at runtime (defined in +`materials/portal_shader.gdshader`), but in editor, it uses a regular material -- find it at +`materials/editor-preview-portal-material.tres`. You can edit this material to customize how +portals look in the editor (in case the default gray color blends in too much). ### Smooth teleportation -The Portal3D script provides a mechanism for smooth teleportation. In order to be -able to create smooth portal transitions, you need to implement a clipping shader -on all meshes that are supposed to participate in the teleportation. +The Portal3D script provides a mechanism for smooth teleportation. In order to be able to create +smooth portal transitions, you need to put a clipping shader onto all meshes that are supposed to +participate in the smooth teleportation. **How to convert a regular mesh to a clippable one?** Like this: @@ -43,22 +41,21 @@ shader_type spatial; PORTALCLIP_UNIFORMS void vertex() { - // ... - PORTALCLIP_VERTEX + // ... + PORTALCLIP_VERTEX } void fragment() { - // ... - PORTALCLIP_FRAGMENT + // ... + PORTALCLIP_FRAGMENT } ``` -And that's it! Now look for `DUPLICATE_MESHES_CALLBACK` in the Portal3D script, you -are ready to get going with smooth teleportation! +And that's it! Now look for `DUPLICATE_MESHES_CALLBACK` in the Portal3D script, you are ready to +get going with smooth teleportation! ## Gizmos -This plugin includes couple of custom gizmos. One gives a -connected portal an outline and the second one visualizes portal's -front direction. You can configure the color of both gizmos in -_Project Settings > Addons > Portals_ or turn them off altogether. +This plugin includes couple of custom gizmos. One gives a connected portal an outline and the +second one visualizes portal's front direction. You can configure the color of both gizmos in +_Project Settings / Addons / Portals_ or turn them off altogether. diff --git a/addons/portals/plugin.cfg b/addons/portals/plugin.cfg index 810fee3..1e7164f 100644 --- a/addons/portals/plugin.cfg +++ b/addons/portals/plugin.cfg @@ -1,7 +1,7 @@ [plugin] -name="3D Portals" -description="Implements seamless portals in 3D" +name="Portals 3D" +description="Seamless portals plugin in 3D" author="Vojtech Struhar" -version="0.1" +version="1.0" script="plugin.gd"