vignette
parent
8e78b26b35
commit
213358a2ba
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 367 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dxtpp41y85tv5"
|
||||
path="res://.godot/imported/white.png-153ed53d54dc091ca42c7c90e2d02504.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Sprites/Misc/white.png"
|
||||
dest_files=["res://.godot/imported/white.png-153ed53d54dc091ca42c7c90e2d02504.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
|
@ -0,0 +1,23 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform float vignette_intensity = 0.4;
|
||||
uniform float vignette_opacity : hint_range(0.0, 1.0) = 0.5;
|
||||
uniform vec4 vignette_rgb : source_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
|
||||
|
||||
float vignette(vec2 uv){
|
||||
uv *= 1.0 - uv.xy;
|
||||
float vignette = uv.x * uv.y * 15.0;
|
||||
return pow(vignette, vignette_intensity * vignette_opacity);
|
||||
}
|
||||
|
||||
void fragment(){
|
||||
vec4 color = texture(SCREEN_TEXTURE, SCREEN_UV);
|
||||
vec4 text = texture(TEXTURE, UV);
|
||||
|
||||
text.rgba *= (vignette_rgb.rgba);
|
||||
text.rgba *= (1.0 - vignette(UV));
|
||||
|
||||
COLOR = vec4((text.rgb)*color.rgb,text.a);
|
||||
}
|
26
UI/Base.tscn
26
UI/Base.tscn
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://c271rdjhd1gfo"]
|
||||
[gd_scene load_steps=11 format=3 uid="uid://c271rdjhd1gfo"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://73jm5qjy52vq" path="res://Dialogue/balloon.tscn" id="1_atjb1"]
|
||||
[ext_resource type="Script" path="res://UI/UIController.cs" id="2_b4b6l"]
|
||||
|
@ -7,6 +7,14 @@
|
|||
[ext_resource type="PackedScene" uid="uid://cr7tkxctmyags" path="res://UI/LevelBar.tscn" id="4_rcekd"]
|
||||
[ext_resource type="PackedScene" uid="uid://c77754nvmckn" path="res://UI/LocationDisplay.tscn" id="5_cr6vo"]
|
||||
[ext_resource type="PackedScene" uid="uid://d3q1yu3n7cqfj" path="res://UI/SceneTransition.tscn" id="6_j0nhv"]
|
||||
[ext_resource type="Shader" path="res://Shaders/Vignette.gdshader" id="8_k080s"]
|
||||
[ext_resource type="Texture2D" uid="uid://dxtpp41y85tv5" path="res://Assets/Sprites/Misc/white.png" id="9_2hlfh"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fmdjb"]
|
||||
shader = ExtResource("8_k080s")
|
||||
shader_parameter/vignette_intensity = 0.1
|
||||
shader_parameter/vignette_opacity = 0.1
|
||||
shader_parameter/vignette_rgb = Color(0.92549, 0, 0.937255, 1)
|
||||
|
||||
[node name="BaseUI" type="CanvasLayer"]
|
||||
process_mode = 3
|
||||
|
@ -27,9 +35,10 @@ size = Vector2i(640, 360)
|
|||
render_target_update_mode = 4
|
||||
|
||||
[node name="DialogBalloon" parent="SubViewportContainer/UIViewport" instance=ExtResource("1_atjb1")]
|
||||
layer = 2
|
||||
layer = 4
|
||||
|
||||
[node name="MainUILayer" type="CanvasLayer" parent="SubViewportContainer/UIViewport"]
|
||||
layer = 3
|
||||
|
||||
[node name="Main" type="Control" parent="SubViewportContainer/UIViewport/MainUILayer" node_paths=PackedStringArray("BossBar")]
|
||||
z_index = 128
|
||||
|
@ -91,3 +100,16 @@ layout_mode = 2
|
|||
|
||||
[node name="SceneTransition" parent="SubViewportContainer/UIViewport/MainUILayer" instance=ExtResource("6_j0nhv")]
|
||||
z_index = 1
|
||||
|
||||
[node name="PostProcessing" type="CanvasLayer" parent="SubViewportContainer/UIViewport"]
|
||||
layer = 2
|
||||
visible = false
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="SubViewportContainer/UIViewport/PostProcessing"]
|
||||
material = SubResource("ShaderMaterial_fmdjb")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("9_2hlfh")
|
||||
|
|
Loading…
Reference in New Issue