Fullscreen/Inputs Update
This commit is contained in:
parent
bb71155ff1
commit
a4d4241268
1017
Main/Main.tscn
1017
Main/Main.tscn
File diff suppressed because it is too large
Load Diff
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_gatrt"]
|
[sub_resource type="Resource" id="Resource_gatrt"]
|
||||||
script = ExtResource("1_gatrt")
|
script = ExtResource("1_gatrt")
|
||||||
value = 2.0
|
value = 6.0
|
||||||
unit = "em"
|
unit = "em"
|
||||||
metadata/_custom_type_script = "uid://cnkyynboxg1qg"
|
metadata/_custom_type_script = "uid://cnkyynboxg1qg"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ public partial class PostProcessingHack : Action
|
||||||
|
|
||||||
for ( int i = 0; i < compositorEffects.Count; i++ )
|
for ( int i = 0; i < compositorEffects.Count; i++ )
|
||||||
{
|
{
|
||||||
|
if ( compositorEffects[ i ] == null )
|
||||||
|
{
|
||||||
|
godotArray.Add( null );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
godotArray.Add( (CompositorEffect) compositorEffects[ i ].Duplicate() );
|
godotArray.Add( (CompositorEffect) compositorEffects[ i ].Duplicate() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -38,6 +43,10 @@ public partial class PostProcessingHack : Action
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
framesCounter --;
|
framesCounter --;
|
||||||
|
|
||||||
if ( framesCounter > 0 )
|
if ( framesCounter > 0 )
|
||||||
|
|
@ -47,6 +56,15 @@ public partial class PostProcessingHack : Action
|
||||||
|
|
||||||
framesCounter = retriggerFramesCount;
|
framesCounter = retriggerFramesCount;
|
||||||
|
|
||||||
|
var selection = EditorInterface.Singleton.GetSelection();
|
||||||
|
var topSelected = selection.GetTopSelectedNodes();
|
||||||
|
|
||||||
|
if ( topSelected.Contains( environment ) )
|
||||||
|
{
|
||||||
|
// RJLog.Log( "Environment selected, not applying Post Processing Hack" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// RJLog.Log( "Applying Post Processing Hack" );
|
// RJLog.Log( "Applying Post Processing Hack" );
|
||||||
ApplyHack();
|
ApplyHack();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
// NOTE: Shader automatically converted from Godot Engine 4.5.stable.mono's StandardMaterial3D.
|
||||||
|
|
||||||
|
shader_type spatial;
|
||||||
|
render_mode blend_mix, depth_draw_opaque, cull_disabled, diffuse_burley, specular_schlick_ggx, unshaded;
|
||||||
|
|
||||||
|
#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Transform.gdshaderinc"
|
||||||
|
#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Math.gdshaderinc"
|
||||||
|
|
||||||
|
uniform float rotation : hint_range(0.0,360);
|
||||||
|
|
||||||
|
uniform vec4 albedo : source_color;
|
||||||
|
uniform vec4 edgeColor : source_color;
|
||||||
|
uniform float edgeSharpness:hint_range(0.1,10);
|
||||||
|
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
|
||||||
|
uniform float alpha_scissor_threshold : hint_range(0.0, 1.0, 0.001);
|
||||||
|
|
||||||
|
|
||||||
|
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap_anisotropic;
|
||||||
|
|
||||||
|
uniform float screenBlend: hint_range(0.0,1);
|
||||||
|
uniform float screenDistorationEdge: hint_range(0.1,10);
|
||||||
|
uniform float screenDistorationMax: hint_range(0.1,10);
|
||||||
|
uniform sampler2D screenDistortionTexture : source_color, filter_linear_mipmap, repeat_enable;
|
||||||
|
uniform float screenDistortionTextureMin = -1.0;
|
||||||
|
uniform float screenDistortionTextureMax = 1.0;
|
||||||
|
uniform float screenDistortionTextureScale = 1.0;
|
||||||
|
uniform float screenLODOffset = 0;
|
||||||
|
|
||||||
|
uniform int particles_anim_h_frames : hint_range(1, 128);
|
||||||
|
uniform int particles_anim_v_frames : hint_range(1, 128);
|
||||||
|
uniform bool particles_anim_loop;
|
||||||
|
|
||||||
|
uniform vec3 uv1_scale;
|
||||||
|
uniform vec3 uv1_offset;
|
||||||
|
uniform vec3 uv2_scale;
|
||||||
|
uniform vec3 uv2_offset;
|
||||||
|
|
||||||
|
uniform vec3 centerWorld;
|
||||||
|
|
||||||
|
void vertex()
|
||||||
|
{
|
||||||
|
UV = UV * uv1_scale.xy + uv1_offset.xy;
|
||||||
|
|
||||||
|
vec3 particlePositionWorld = extractTranslation( MODEL_MATRIX );
|
||||||
|
vec2 particlePositionScreen = worldToScreen( particlePositionWorld, VIEW_MATRIX, PROJECTION_MATRIX );
|
||||||
|
vec2 centerScreen = worldToScreen( centerWorld, VIEW_MATRIX, PROJECTION_MATRIX );
|
||||||
|
vec2 directionScreen = ( centerScreen - particlePositionScreen );
|
||||||
|
float screenAngle = atan( -directionScreen.y, directionScreen.x ) + rotation/360.0 * PI * 2.0;
|
||||||
|
// Billboard Mode: Particles
|
||||||
|
mat4 mat_world = mat4(
|
||||||
|
normalize(INV_VIEW_MATRIX[0]),
|
||||||
|
normalize(INV_VIEW_MATRIX[1]),
|
||||||
|
normalize(INV_VIEW_MATRIX[2]),
|
||||||
|
MODEL_MATRIX[3]);
|
||||||
|
mat_world = mat_world * mat4(
|
||||||
|
vec4(cos(INSTANCE_CUSTOM.x), -sin(INSTANCE_CUSTOM.x), 0.0, 0.0),
|
||||||
|
vec4(sin(INSTANCE_CUSTOM.x), cos(INSTANCE_CUSTOM.x), 0.0, 0.0),
|
||||||
|
vec4(0.0, 0.0, 1.0, 0.0),
|
||||||
|
vec4(0.0, 0.0, 0.0, 1.0));
|
||||||
|
|
||||||
|
MODELVIEW_MATRIX = VIEW_MATRIX * mat_world * eulerRotation(vec3( 0, 0, screenAngle ) );
|
||||||
|
|
||||||
|
// Billboard Keep Scale: Enabled
|
||||||
|
MODELVIEW_MATRIX = MODELVIEW_MATRIX * mat4(
|
||||||
|
vec4(length(MODEL_MATRIX[0].xyz), 0.0, 0.0, 0.0),
|
||||||
|
vec4(0.0, length(MODEL_MATRIX[1].xyz), 0.0, 0.0),
|
||||||
|
vec4(0.0, 0.0, length(MODEL_MATRIX[2].xyz) * 1.0, 0.0),
|
||||||
|
vec4(0.0, 0.0, 0.0, 1.0));
|
||||||
|
|
||||||
|
MODELVIEW_NORMAL_MATRIX = mat3(MODELVIEW_MATRIX);
|
||||||
|
|
||||||
|
|
||||||
|
float h_frames = float(particles_anim_h_frames);
|
||||||
|
float v_frames = float(particles_anim_v_frames);
|
||||||
|
float particle_total_frames = float(particles_anim_h_frames * particles_anim_v_frames);
|
||||||
|
float particle_frame = floor(INSTANCE_CUSTOM.z * float(particle_total_frames));
|
||||||
|
if (!particles_anim_loop) {
|
||||||
|
particle_frame = clamp(particle_frame, 0.0, particle_total_frames - 1.0);
|
||||||
|
} else {
|
||||||
|
particle_frame = mod(particle_frame, particle_total_frames);
|
||||||
|
}
|
||||||
|
UV /= vec2(h_frames, v_frames);
|
||||||
|
UV += vec2(mod(particle_frame, h_frames) / h_frames, floor((particle_frame + 0.5) / h_frames) / v_frames);
|
||||||
|
}
|
||||||
|
|
||||||
|
void fragment()
|
||||||
|
{
|
||||||
|
ALPHA_SCISSOR_THRESHOLD = alpha_scissor_threshold;
|
||||||
|
|
||||||
|
vec2 base_uv = UV;
|
||||||
|
|
||||||
|
vec4 albedo_tex = texture(texture_albedo, base_uv);
|
||||||
|
|
||||||
|
|
||||||
|
// Vertex Color Use as Albedo: Enabled
|
||||||
|
albedo_tex *= COLOR;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALBEDO = albedo.rgb * albedo_tex.rgb;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ALPHA *= albedo.a * albedo_tex.a;
|
||||||
|
|
||||||
|
float edge = map( ALPHA, 1.0, alpha_scissor_threshold, 0.0, 1.0 );
|
||||||
|
float distortionAmount = mix( screenDistortionTextureMin, screenDistortionTextureMax, texture( screenDistortionTexture, UV ).r ) * screenDistortionTextureScale;
|
||||||
|
float distortionEdge = pow( 1.0 - edge, screenDistorationEdge );
|
||||||
|
float distortion = mix( 1.0, screenDistorationMax, distortionEdge + distortionAmount );
|
||||||
|
edge = pow( edge, edgeSharpness );
|
||||||
|
|
||||||
|
vec4 screenColor = textureLod( screen_texture, ( SCREEN_UV - vec2( 0.5 ) ) / distortion + vec2( 0.5 ), screenLODOffset );
|
||||||
|
// vec4 screenColor = vec4( ALBEDO, 1.0 );
|
||||||
|
ALBEDO = mix( ALBEDO, ALBEDO * screenColor.rgb, screenBlend );
|
||||||
|
ALBEDO = mix( ALBEDO, edgeColor.rgb, edge * edgeColor.a );
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
uid://l4ir8stxvwaj
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 98 KiB |
|
|
@ -0,0 +1,41 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bbb6qsrhvayj0"
|
||||||
|
path.s3tc="res://.godot/imported/splat-animated-soft-alpha.png-b563b76bdf1379012adc251ca84b8988.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Utilities/Testing/splat-animated-soft-alpha.png"
|
||||||
|
dest_files=["res://.godot/imported/splat-animated-soft-alpha.png-b563b76bdf1379012adc251ca84b8988.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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=0
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
|
|
@ -0,0 +1,41 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://h3m2p0ra0itf"
|
||||||
|
path.s3tc="res://.godot/imported/splat_animated.png-924b13a1a9a52dc129300b82319a58cf.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Utilities/Testing/splat_animated.png"
|
||||||
|
dest_files=["res://.godot/imported/splat_animated.png-924b13a1a9a52dc129300b82319a58cf.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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=0
|
||||||
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 250 KiB |
|
|
@ -0,0 +1,44 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bndjrqkqx7o3l"
|
||||||
|
path.s3tc="res://.godot/imported/water-splash.svg-821c9852572c284218128fd21c4562da.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Utilities/Testing/water-splash.svg"
|
||||||
|
dest_files=["res://.godot/imported/water-splash.svg-821c9852572c284218128fd21c4562da.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
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=0
|
||||||
|
svg/scale=1.0
|
||||||
|
editor/scale_with_editor_scale=false
|
||||||
|
editor/convert_colors_with_editor_theme=false
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit f37b4b41c8a6c8498afee8c8463d0a3a02a7b15f
|
Subproject commit 4bfb94540fa0c7b6f6eb00d2bfa682919a3052c8
|
||||||
|
|
@ -38,13 +38,13 @@ application/modify_resources=true
|
||||||
application/icon="uid://dws653np5py2n"
|
application/icon="uid://dws653np5py2n"
|
||||||
application/console_wrapper_icon=""
|
application/console_wrapper_icon=""
|
||||||
application/icon_interpolation=4
|
application/icon_interpolation=4
|
||||||
application/file_version=""
|
application/file_version="0.1"
|
||||||
application/product_version=""
|
application/product_version="0.1"
|
||||||
application/company_name=""
|
application/company_name="Rokojori"
|
||||||
application/product_name=""
|
application/product_name="WinterTales"
|
||||||
application/file_description=""
|
application/file_description="WinterTales Game Demo"
|
||||||
application/copyright=""
|
application/copyright="Rokojori"
|
||||||
application/trademarks=""
|
application/trademarks="Rokojori"
|
||||||
application/export_angle=0
|
application/export_angle=0
|
||||||
application/export_d3d12=0
|
application/export_d3d12=0
|
||||||
application/d3d12_agility_sdk_multiarch=true
|
application/d3d12_agility_sdk_multiarch=true
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,12 @@ config/icon="res://icon.svg"
|
||||||
|
|
||||||
RokojoriRootAutoLoad="*res://addons/rokojori_action_library/Runtime/Godot/Root.cs"
|
RokojoriRootAutoLoad="*res://addons/rokojori_action_library/Runtime/Godot/Root.cs"
|
||||||
|
|
||||||
|
[display]
|
||||||
|
|
||||||
|
window/size/viewport_width=1920
|
||||||
|
window/size/viewport_height=1080
|
||||||
|
window/size/mode=4
|
||||||
|
|
||||||
[dotnet]
|
[dotnet]
|
||||||
|
|
||||||
project/assembly_name="Winter Tales"
|
project/assembly_name="Winter Tales"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue