more to LFS

This commit is contained in:
Amazed 2021-09-17 15:04:05 +02:00
parent 999820bf9a
commit 5773433607
3241 changed files with 12680 additions and 2412005 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,36 @@
[remap]
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/lens_dirt_default.jpeg-3f287122b93342331cfc65a44f24cd71.s3tc.stex"
path.etc2="res://.import/lens_dirt_default.jpeg-3f287122b93342331cfc65a44f24cd71.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
}
[deps]
source_file="res://addons/silicon.vfx.lens_flare/lens_dirt_default.jpeg"
dest_files=[ "res://.import/lens_dirt_default.jpeg-3f287122b93342331cfc65a44f24cd71.s3tc.stex", "res://.import/lens_dirt_default.jpeg-3f287122b93342331cfc65a44f24cd71.etc2.stex" ]
[params]
compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,109 @@
tool
extends Node
## Exported variables
var flare_strength := 1.0 setget set_flare_strength
var flare_bias := 1.05 setget set_flare_bias
var flare_blur := 2.0 setget set_flare_blur;
var distortion_quality := 0 setget set_distortion_quality;
var distortion := 2.0 setget set_flare_distortion
var ghost_count := 7 setget set_ghost_count
var ghost_spacing := 0.3 setget set_ghost_spacing
var halo_width := 0.25 setget set_halo_width
var streak_strength := 0.5 setget set_streak_strength
var lens_dirt = preload("lens_dirt_default.jpeg") setget set_lens_dirt
## Exported variables
var screen := MeshInstance.new()
var material := preload("lens_flare_shader.tres").duplicate()
func _get_property_list() -> Array:
var properties := [
{name="LensFlare", type=TYPE_NIL, usage=PROPERTY_USAGE_CATEGORY},
{name="flare_strength", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,16"},
{name="flare_bias", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,16"},
{name="flare_blur", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,10"},
{name="distortion_quality", type=TYPE_INT, hint=PROPERTY_HINT_ENUM, hint_string="Low,Medium,High"},
{name="distortion", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,50"},
{name="ghost_count", type=TYPE_INT, hint=PROPERTY_HINT_RANGE, hint_string="0,20"},
{name="ghost_spacing", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,1"},
{name="halo_width", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,1"},
{name="streak_strength", type=TYPE_REAL, hint=PROPERTY_HINT_RANGE, hint_string="0,1"},
{name="lens_dirt", type=TYPE_OBJECT, hint=PROPERTY_HINT_RESOURCE_TYPE, hint_string="Texture"},
]
return properties
func _init() -> void:
screen.mesh = CubeMesh.new()
screen.scale = Vector3(1,1,1) * pow(2.0,30);
add_child(screen)
screen.material_override = material
func _enter_tree() -> void:
set_flare_strength(flare_strength)
set_flare_bias(flare_bias)
set_flare_distortion(distortion)
set_distortion_quality(distortion_quality)
set_ghost_count(ghost_count)
set_ghost_spacing(ghost_spacing)
set_halo_width(halo_width)
set_streak_strength(streak_strength)
set_flare_blur(flare_blur)
set_lens_dirt(lens_dirt)
func set_flare_strength(value: float) -> void:
flare_strength = value
material.set_shader_param("bloom_scale", value)
func set_flare_bias(value: float) -> void:
flare_bias = value
material.set_shader_param("bloom_bias", value)
func set_flare_distortion(value: float) -> void:
distortion = value
material.set_shader_param("distort", value)
func set_distortion_quality(value: int) -> void:
distortion_quality = value
material.set_shader_param("distortion_quality", value)
func set_ghost_count(value: int) -> void:
ghost_count = value
material.set_shader_param("ghosts", value)
func set_ghost_spacing(value: float) -> void:
ghost_spacing = value
material.set_shader_param("ghost_dispersal", value)
func set_halo_width(value: float) -> void:
halo_width = value
material.set_shader_param("halo_width", value)
func set_streak_strength(value: float) -> void:
streak_strength = value
material.set_shader_param("streak_strength", value)
func set_flare_blur(value: float) -> void:
flare_blur = value
material.set_shader_param("lod", value)
func set_lens_dirt(value: Texture) -> void:
lens_dirt = value
material.set_shader_param("lens_dirt", value)

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/lens_flare_icon.png-3a2bc3c4af36c704bff6a81775825ad6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/silicon.vfx.lens_flare/lens_flare_icon.png"
dest_files=[ "res://.import/lens_flare_icon.png-3a2bc3c4af36c704bff6a81775825ad6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,132 @@
[gd_resource type="ShaderMaterial" load_steps=7 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type spatial;
render_mode skip_vertex_transform, unshaded, blend_add;
uniform float lod = 0.0;
uniform float stretch_to_aspect = 0.5;
uniform int ghosts = 4;
uniform float ghost_dispersal = 0.5;
uniform float halo_width = 0.25;
uniform float distort = 0.25;
uniform float bloom_scale = 10.0;
uniform float bloom_bias = 0.95;
uniform float streak_strength = 1.0;
uniform int distortion_quality : hint_range(0, 2);
uniform sampler2D lens_color;
uniform sampler2D lens_dirt;
uniform sampler2D starburst;
void vertex() {
POSITION = vec4(VERTEX, 1.0);
POSITION.z = -1.0;
}
float weight(vec2 pos) {
float w = length(vec2(0.5) - pos) / length(vec2(0.5));
return pow(1.0 - w, 5.0);
}
vec3 bloomtex(sampler2D tex, vec2 texcoord) {
return max(vec3(0.0), textureLod(tex, texcoord, lod).rgb - bloom_bias) * bloom_scale;
}
vec3 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, float distortion) {
vec3 color = vec3(0);
float divisor = 1.0;
color.r += bloomtex(tex, texcoord - direction * distortion).r;
color.g += bloomtex(tex, texcoord).g;
color.b += bloomtex(tex, texcoord + direction * distortion).b;
if(distortion_quality == 1) {
color.rg += bloomtex(tex, texcoord - direction * distortion * 0.5).rg * vec2(1.0, 0.5);
color.gb += bloomtex(tex, texcoord + direction * distortion * 0.5).gb * vec2(0.5, 1.0);
divisor = 2.0;
} else if(distortion_quality == 2) {
color.rg += bloomtex(tex, texcoord - direction * distortion * 0.667).rg * vec2(1.0, 0.333);
color.rg += bloomtex(tex, texcoord - direction * distortion * 0.333).rg * vec2(1.0, 0.667);
color.gb += bloomtex(tex, texcoord + direction * distortion * 0.333).gb * vec2(0.667, 1.0);
color.gb += bloomtex(tex, texcoord + direction * distortion * 0.667).gb * vec2(0.333, 1.0);
divisor = 3.0;
}
return color / divisor;
}
void fragment() {
vec2 texcoord = 1.0 - SCREEN_UV;
vec2 ghostVec = (vec2(0.5) - texcoord) * ghost_dispersal;
float pixelSizeX = 1.0 / float(textureSize(SCREEN_TEXTURE, 0).x);
float distortion = pixelSizeX * distort;
vec2 direction = normalize(ghostVec);
// Ghosts
vec3 result = vec3(0.0);
for(int i = 0; i < ghosts; ++i) {
vec2 offset = fract(texcoord + ghostVec * float(i));
result += textureDistorted(SCREEN_TEXTURE, offset, direction, distortion * weight(offset)) * weight(offset);
}
result *= texture(lens_color, vec2(length(vec2(0.5) - texcoord) / length(vec2(0.5)), 0)).rgb;
// Halo
vec2 aspect = vec2(1.0, mix(1.0, VIEWPORT_SIZE.x / VIEWPORT_SIZE.y, stretch_to_aspect));
vec2 haloVec = normalize(ghostVec / aspect) * aspect * halo_width;
result += textureDistorted(SCREEN_TEXTURE, texcoord + haloVec, direction, distortion) * weight(fract(texcoord + haloVec));
// Starburst
vec2 centerVec = SCREEN_UV - vec2(0.5);
float d = length(centerVec);
float radial = acos(centerVec.x / d);
float starOffset = dot(CAMERA_MATRIX[2].xyz, vec3(1.0)) * 10.0;
float star =
texture(starburst, vec2(radial + starOffset)).r
* texture(starburst, vec2(radial + starOffset * 0.5)).r;
star = clamp(star + (1.0 - smoothstep(0.0, 0.3, d)), 0.0, 1.0);
result *= mix(0.5, star, streak_strength);
ALBEDO = result * mix(texture(lens_dirt, texcoord).rgb, vec3(0.5), 0.4);
//uncomment to debug bright point extraction
//ALBEDO = bloomtex(SCREEN_TEXTURE, SCREEN_UV).rgb;
}"
[sub_resource type="Gradient" id=2]
colors = PoolColorArray( 0.774481, 0.756324, 0.309654, 1, 0.890625, 0.125, 1, 1 )
[sub_resource type="GradientTexture" id=3]
gradient = SubResource( 2 )
[sub_resource type="StreamTexture" id=4]
flags = 7
[sub_resource type="OpenSimplexNoise" id=5]
period = 2.0
[sub_resource type="NoiseTexture" id=6]
height = 1
noise = SubResource( 5 )
[resource]
shader = SubResource( 1 )
shader_param/lod = 0.0
shader_param/stretch_to_aspect = 0.0
shader_param/ghosts = 7
shader_param/ghost_dispersal = 1.19
shader_param/halo_width = 0.692
shader_param/distort = 6.57
shader_param/bloom_scale = 0.294
shader_param/bloom_bias = 7.295
shader_param/streak_strength = 1.0
shader_param/distortion_quality = null
shader_param/lens_color = SubResource( 3 )
shader_param/lens_dirt = SubResource( 4 )
shader_param/starburst = SubResource( 6 )

View File

@ -0,0 +1,7 @@
[plugin]
name="LensFlare Effect"
description="A post-processing effect that generates the lens flare effect that happen in real world cameras. It may not be physically accurate, but it can suffice for most scenarios."
author="SIsilicon"
version="1.3"
script="plugin.gd"

View File

@ -0,0 +1,14 @@
tool
extends EditorPlugin
func _enter_tree() -> void:
add_custom_type(
"LensFlare", "Node",
preload("lens_flare.gd"),
preload("lens_flare_icon.png")
)
func _exit_tree() -> void:
remove_custom_type("LensFlare")

View File

@ -9,19 +9,17 @@
[sub_resource type="SpatialMaterial" id=1]
flags_transparent = true
params_cull_mode = 2
albedo_color = Color( 0.290196, 0.568627, 0.529412, 0.792157 )
albedo_color = Color( 0.290196, 0.568627, 0.529412, 1 )
albedo_texture = ExtResource( 3 )
roughness = 0.31
normal_enabled = true
normal_scale = 1.0
normal_texture = ExtResource( 2 )
refraction_enabled = true
refraction_scale = 0.05
refraction_texture_channel = 0
uv1_scale = Vector3( 1000, 1000, 1000 )
uv1_offset = Vector3( 0.471964, 0.471964, 0.471964 )
proximity_fade_enable = true
proximity_fade_distance = 2.0
distance_fade_mode = 1
distance_fade_min_distance = 0.0
distance_fade_max_distance = 20.0
uv1_offset = Vector3( 1.9554, 1.9554, 1.9554 )
[sub_resource type="PlaneMesh" id=2]
material = SubResource( 1 )

BIN
assets/all_gbs/1MCsonak_4guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/1Tsonak.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1Tsonak.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1Tsonak_4guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1Tsonak_4guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1_kamikazi.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1_kamikazi.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1_ripper.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1_ripper.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1sonak_4guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/1sonak_4guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2_rippers.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2_rippers.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x1_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x1_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x2_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x2_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x3_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x3_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x4_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x4_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x5_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/2x5_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/3_flying_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/3_flying_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/3_rippers.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/3_rippers.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/4_wide_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/4_wide_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/5_flying_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/5_flying_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/7_flying_guards.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/7_flying_guards.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Cold_wind_gusts.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_High_winds_light.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_K1.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K1.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K2.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K2.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K3.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K3.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K4.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K4.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K5_storm.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_K5_storm.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Kabuto_temp.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Kabuto_temp.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M1_near_beach.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M1_near_beach.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M2_mnt_beach.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M2_mnt_beach.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M3_cliffs_sand.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_M4_beach_dark.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M4_beach_dark.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_M5_beach_waves.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp_amb.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp_amb.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp_battle.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp_sus.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Mecc_temp_sus.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R1_light_rain.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R1_light_rain.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R2_snow.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R2_snow.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R3_race.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R3_race.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R4_darker.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R4_darker.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R5_mountain.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_R5_mountain.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_River.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_River.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_Shoreline_long.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_Smartie_village.gbs.obj (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
assets/all_gbs/A_Volcano.gbs.obj (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_Volcano.gbs.obj.mtl (Stored with Git LFS)

Binary file not shown.

BIN
assets/all_gbs/A_army_barracks.gbs.obj (Stored with Git LFS)

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More