Compare commits

..

No commits in common. "d52d760b1864e5e7effa664cc9e8d82c40a2b56d" and "5bd3226960b38b4c2d9c8ead5f7ed0eae41b5d58" have entirely different histories.

5 changed files with 27 additions and 25 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
# Godot 4+ specific ignores # Godot 4+ specific ignores
.godot/ .godot/
/android/ /android/
.DS_Store

BIN
addons/.DS_Store vendored Normal file

Binary file not shown.

BIN
addons/portals/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -4,26 +4,28 @@ This plugin enables you to easily create seamless plugins.
## Documentation ## Documentation
For documentation about `Portal3D`, see the portal script itself. Everything is properly documented For documentation about `Portal3D`, see the portal script itself.
and viewable in the default documentation window. Go to the script editor, click _Search Help_ in Everything is properly documented and viewable in the default
the top bar and search for "Portal3D". documentation window. Click _Script > Search Help_ and type
"Portal3D" in there.
For everything else, there is this README. For everything else, there is this README.
## Guides ## Materials
### Customize portals in the editor ### Portals
The portal mesh has a custom shader material assigned to it at runtime (defined in The portal mesh has a custom shader material assigned to it at runtime,
`materials/portal_shader.gdshader`), but in editor, it uses a regular material -- find it at (defined in `materials/portal_shader.gdshader`), but in editor, it uses
`materials/editor-preview-portal-material.tres`. You can edit this material to customize how a regular material -- find it at `materials/editor-preview-portal-material.tres`.
portals look in the editor (in case the default gray color blends in too much). 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 ### Smooth teleportation
The Portal3D script provides a mechanism for smooth teleportation. In order to be able to create The Portal3D script provides a mechanism for smooth teleportation. In order to be
smooth portal transitions, you need to put a clipping shader onto all meshes that are supposed to able to create smooth portal transitions, you need to implement a clipping shader
participate in the smooth teleportation. on all meshes that are supposed to participate in the teleportation.
**How to convert a regular mesh to a clippable one?** Like this: **How to convert a regular mesh to a clippable one?** Like this:
@ -51,11 +53,12 @@ void fragment() {
} }
``` ```
And that's it! Now look for `DUPLICATE_MESHES_CALLBACK` in the Portal3D script, you are ready to And that's it! Now look for `DUPLICATE_MESHES_CALLBACK` in the Portal3D script, you
get going with smooth teleportation! are ready to get going with smooth teleportation!
## Gizmos ## Gizmos
This plugin includes couple of custom gizmos. One gives a connected portal an outline and the This plugin includes couple of custom gizmos. One gives a
second one visualizes portal's front direction. You can configure the color of both gizmos in connected portal an outline and the second one visualizes portal's
_Project Settings / Addons / Portals_ or turn them off altogether. front direction. You can configure the color of both gizmos in
_Project Settings > Addons > Portals_ or turn them off altogether.

View File

@ -1,7 +1,7 @@
[plugin] [plugin]
name="Portals 3D" name="3D Portals"
description="Seamless portals plugin in 3D" description="Implements seamless portals in 3D"
author="Vojtech Struhar" author="Vojtech Struhar"
version="1.0" version="0.1"
script="plugin.gd" script="plugin.gd"