This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shader_type spatial; | |
| uniform sampler2D mask; | |
| uniform float min_scale = 0.0; | |
| uniform float max_scale = 1.0; | |
| varying float scale; | |
| float range_lerp(float value, float istart, float istop, float ostart, float oend) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tool | |
| class_name ConceptBoxInput | |
| extends Spatial | |
| signal input_changed | |
| signal property_changed | |
| export var size := Vector3.ONE setget set_size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shader_type spatial; | |
| uniform float pattern_scale = 20; | |
| uniform sampler2D pattern_texture : source_color; | |
| uniform float cutoff: hint_range(0.0, 1.0) = 0.5; | |
| uniform float band_width: hint_range(0.0, 2.0) = 1.0; | |
| // Optionel, pour le screen_uv local | |
| varying flat vec4 NODE_POSITION_CLIP; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A Godot 4 shader to make things appear on top of other things within a range. | |
| // Initially, this was made so my characters' facial features would be rendered on top of their hair. | |
| shader_type spatial; | |
| render_mode unshaded; | |
| uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest; | |
| // Maximum depth we can overdraw relative to the object original depth, in ENGINE UNITS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends Node | |
| ## User Interface Manager | |
| ## Add as an autoload | |
| ## | |
| ## Handle switching between gamepad and M+K | |
| ## Automatically gives focus to a hovered button | |
| signal gamepad_changed(enabled: bool) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shader_type spatial; | |
| uniform sampler2D depth_texture : hint_depth_texture, repeat_disable, filter_nearest; | |
| uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; | |
| uniform float v_depth_offset = 0.0; | |
| uniform float v_depth_fade = 1.0; | |
| uniform sampler2D underwater_color : repeat_disable; | |
| uniform sampler2D caustics_texture : hint_default_black; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @tool | |
| extends EditorScenePostImport | |
| ## Import script example | |
| ## | |
| ## GENERAL | |
| ## + Removes the empty root node (if any) | |
| ## | |
| ## COLLISIONS: | |
| ## + Append '-static' to the node name to mark it as a static body |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| float lts(float L) { | |
| if (abs(L) < 0.0031308) { | |
| return 12.92 * L; | |
| } | |
| return 1.055 * pow(L, (1.0 / 2.4)) - 0.055; | |
| } | |
| vec3 rgb_to_srgb(vec3 color) { | |
| return vec3(lts(color.r), lts(color.g), lts(color.b)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Returns the first child node of a given class. | |
| ## If deep_search is true, search the whole tree below this node. | |
| static func find_child_with_class(root: Node, type: Variant, deep_search: bool = false) -> Node: | |
| if not is_instance_valid(root): | |
| return null | |
| if is_instance_of(root, type): | |
| return root | |
| var candidates: Array[Node] = root.get_children() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extends Node | |
| ## Automatically plays a sound on button click and hover | |
| ## Make it an autoload to work. | |
| # Sound files | |
| # Replace the path with your own | |
| const BUTTON_CLICK := preload("res://ui/sfx/click_soft.ogg") | |
| const BUTTON_FOCUS := preload("res://ui/sfx/bong_001.ogg") |
NewerOlder