CleanUp for v0.4
|
After Width: | Height: | Size: 108 KiB |
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://detsilp12nioo"
|
||||
path.s3tc="res://.godot/imported/lens-dirt.png-58b4cc5b654fba956851bc4f0ff8b21a.s3tc.ctex"
|
||||
uid="uid://pud4itdh01sq"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Diffuse.png-61864fa872ce37d3d81bc5d9623a4b07.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
|
|
@ -11,8 +11,8 @@ metadata={
|
|||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/lens-dirt.png"
|
||||
dest_files=["res://.godot/imported/lens-dirt.png-58b4cc5b654fba956851bc4f0ff8b21a.s3tc.ctex"]
|
||||
source_file="res://GameObjects/Round-Cobe/Baked/Cube LP_Bake1_PBR StoA_Diffuse.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Diffuse.png-61864fa872ce37d3d81bc5d9623a4b07.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
After Width: | Height: | Size: 108 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ddot3wjfq01mo"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Emission.png-4620fd51f25e60ff862a6ec344015c96.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/Baked/Cube LP_Bake1_PBR StoA_Emission.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Emission.png-4620fd51f25e60ff862a6ec344015c96.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
|
||||
|
After Width: | Height: | Size: 66 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bwsgfb0b4okj4"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Metalness-Cube LP_Bake1_PBR StoA_Roughness.png-648a3878c2b1f83ba5eea67b9af3c75a.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/Baked/Cube LP_Bake1_PBR StoA_Metalness-Cube LP_Bake1_PBR StoA_Roughness.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Metalness-Cube LP_Bake1_PBR StoA_Roughness.png-648a3878c2b1f83ba5eea67b9af3c75a.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
|
||||
|
After Width: | Height: | Size: 2.7 MiB |
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cahr6efa5lasl"
|
||||
path="res://.godot/imported/Cube LP_Bake1_PBR StoA_Normal.png-314a8b3de70d95c7d2c84ca5516e1cb0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/Baked/Cube LP_Bake1_PBR StoA_Normal.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Normal.png-314a8b3de70d95c7d2c84ca5516e1cb0.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=1
|
||||
roughness/src_normal="res://GameObjects/Round-Cobe/Baked/Cube LP_Bake1_PBR StoA_Normal.png"
|
||||
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
|
||||
|
|
@ -0,0 +1,181 @@
|
|||
{
|
||||
"asset":{
|
||||
"generator":"Khronos glTF Blender I/O v3.6.27",
|
||||
"version":"2.0"
|
||||
},
|
||||
"scene":0,
|
||||
"scenes":[
|
||||
{
|
||||
"name":"Scene",
|
||||
"nodes":[
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes":[
|
||||
{
|
||||
"mesh":0,
|
||||
"name":"Cube LP_Baked",
|
||||
"scale":[
|
||||
0.8808151483535767,
|
||||
0.8808151483535767,
|
||||
0.8808151483535767
|
||||
]
|
||||
}
|
||||
],
|
||||
"materials":[
|
||||
{
|
||||
"doubleSided":true,
|
||||
"emissiveFactor":[
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"emissiveTexture":{
|
||||
"index":0
|
||||
},
|
||||
"name":"Cube LP_Baked",
|
||||
"normalTexture":{
|
||||
"index":1
|
||||
},
|
||||
"pbrMetallicRoughness":{
|
||||
"baseColorTexture":{
|
||||
"index":2
|
||||
},
|
||||
"metallicRoughnessTexture":{
|
||||
"index":3
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes":[
|
||||
{
|
||||
"name":"Cube.010",
|
||||
"primitives":[
|
||||
{
|
||||
"attributes":{
|
||||
"POSITION":0,
|
||||
"NORMAL":1,
|
||||
"TEXCOORD_0":2
|
||||
},
|
||||
"indices":3,
|
||||
"material":0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"textures":[
|
||||
{
|
||||
"sampler":0,
|
||||
"source":0
|
||||
},
|
||||
{
|
||||
"sampler":0,
|
||||
"source":1
|
||||
},
|
||||
{
|
||||
"sampler":0,
|
||||
"source":2
|
||||
},
|
||||
{
|
||||
"sampler":0,
|
||||
"source":3
|
||||
}
|
||||
],
|
||||
"images":[
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"Cube LP_Bake1_PBR StoA_Emission",
|
||||
"uri":"Cube%20LP_Bake1_PBR%20StoA_Emission.png"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"Cube LP_Bake1_PBR StoA_Normal",
|
||||
"uri":"Cube%20LP_Bake1_PBR%20StoA_Normal.png"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"Cube LP_Bake1_PBR StoA_Diffuse",
|
||||
"uri":"Cube%20LP_Bake1_PBR%20StoA_Diffuse.png"
|
||||
},
|
||||
{
|
||||
"mimeType":"image/png",
|
||||
"name":"Cube LP_Bake1_PBR StoA_Metalness-Cube LP_Bake1_PBR StoA_Roughness",
|
||||
"uri":"Cube%20LP_Bake1_PBR%20StoA_Metalness-Cube%20LP_Bake1_PBR%20StoA_Roughness.png"
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
{
|
||||
"bufferView":0,
|
||||
"componentType":5126,
|
||||
"count":263,
|
||||
"max":[
|
||||
0.9831128716468811,
|
||||
0.9831128716468811,
|
||||
0.9831128716468811
|
||||
],
|
||||
"min":[
|
||||
-0.9831128716468811,
|
||||
-0.9831128716468811,
|
||||
-0.9831128716468811
|
||||
],
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":1,
|
||||
"componentType":5126,
|
||||
"count":263,
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":2,
|
||||
"componentType":5126,
|
||||
"count":263,
|
||||
"type":"VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView":3,
|
||||
"componentType":5123,
|
||||
"count":1296,
|
||||
"type":"SCALAR"
|
||||
}
|
||||
],
|
||||
"bufferViews":[
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":3156,
|
||||
"byteOffset":0,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":3156,
|
||||
"byteOffset":3156,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":2104,
|
||||
"byteOffset":6312,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":2592,
|
||||
"byteOffset":8416,
|
||||
"target":34963
|
||||
}
|
||||
],
|
||||
"samplers":[
|
||||
{
|
||||
"magFilter":9729,
|
||||
"minFilter":9987
|
||||
}
|
||||
],
|
||||
"buffers":[
|
||||
{
|
||||
"byteLength":11008,
|
||||
"uri":"Rounded-Cube-Baked.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cv5j1yrrlt7le"
|
||||
path="res://.godot/imported/Rounded-Cube-Baked.gltf-c3142cf8cc79104d0e1d87ab6fd48116.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/Baked/Rounded-Cube-Baked.gltf"
|
||||
dest_files=["res://.godot/imported/Rounded-Cube-Baked.gltf-c3142cf8cc79104d0e1d87ab6fd48116.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dua1ywlp51rg0"
|
||||
path="res://.godot/imported/Rounded-Cube.blend-86f1d40fe710e4e56500f76a98eb0714.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/Rounded-Cube.blend"
|
||||
dest_files=["res://.godot/imported/Rounded-Cube.blend-86f1d40fe710e4e56500f76a98eb0714.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
blender/nodes/visible=0
|
||||
blender/nodes/active_collection_only=false
|
||||
blender/nodes/punctual_lights=true
|
||||
blender/nodes/cameras=true
|
||||
blender/nodes/custom_properties=true
|
||||
blender/nodes/modifiers=1
|
||||
blender/meshes/colors=false
|
||||
blender/meshes/uvs=true
|
||||
blender/meshes/normals=true
|
||||
blender/meshes/export_geometry_nodes_instances=false
|
||||
blender/meshes/tangents=true
|
||||
blender/meshes/skins=2
|
||||
blender/meshes/export_bones_deforming_mesh_only=false
|
||||
blender/materials/unpack_enabled=true
|
||||
blender/materials/export_materials=1
|
||||
blender/animation/limit_playback=true
|
||||
blender/animation/always_sample=true
|
||||
blender/animation/group_tracks=true
|
||||
gltf/naming_version=2
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dui2866p6d36l"
|
||||
path="res://.godot/imported/Cube LP Flat.fbx-053339c4f90eb6bc4892df111463eb85.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat.fbx"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat.fbx-053339c4f90eb6bc4892df111463eb85.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c6v5rc7m3guai"
|
||||
path.s3tc="res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Diffuse.png-f02f4afd909eb6c3efe3252677847f79.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Diffuse.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Diffuse.png-f02f4afd909eb6c3efe3252677847f79.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
|
||||
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://djmiftbqhbji1"
|
||||
path.s3tc="res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Emission.png-695b73b3624f4a860614e871cdd58554.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Emission.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Emission.png-695b73b3624f4a860614e871cdd58554.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
|
||||
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://w67vbmcjbog3"
|
||||
path="res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Metalness.png-17993111a7088135a7439e09c42c4297.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Metalness.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Metalness.png-17993111a7088135a7439e09c42c4297.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
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=1
|
||||
|
After Width: | Height: | Size: 1.4 MiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c3mdxuvpllkax"
|
||||
path.s3tc="res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Normal.png-60c9b351f8d3e73d74f5ffdad84fbf15.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Normal.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Normal.png-60c9b351f8d3e73d74f5ffdad84fbf15.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=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=1
|
||||
roughness/src_normal="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Normal.png"
|
||||
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
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://y61sguhmmvoj"
|
||||
path.s3tc="res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Roughness.png-f2ba4c658c7dec410423b99c00ab6c09.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR StoA_Roughness.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR StoA_Roughness.png-f2ba4c658c7dec410423b99c00ab6c09.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
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ojcdd1nkb4l6"
|
||||
path="res://.godot/imported/Cube LP Flat_Bake1_PBR_Ambient Occlusion.png-1179acc6bd0f2091fb68644dbf58300c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP Flat/Cube LP Flat_Bake1_PBR_Ambient Occlusion.png"
|
||||
dest_files=["res://.godot/imported/Cube LP Flat_Bake1_PBR_Ambient Occlusion.png-1179acc6bd0f2091fb68644dbf58300c.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
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=1
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://dbxephjqfl2oy"
|
||||
path="res://.godot/imported/Cube LP.fbx-ed08079d79329097da102f4f26c55a70.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP.fbx"
|
||||
dest_files=["res://.godot/imported/Cube LP.fbx-ed08079d79329097da102f4f26c55a70.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=true
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
fbx/importer=0
|
||||
fbx/allow_geometry_helper_nodes=false
|
||||
fbx/embedded_image_handling=1
|
||||
fbx/naming_version=2
|
||||
|
After Width: | Height: | Size: 108 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://srqe6nvru3ss"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Diffuse.png-3eca1e3af93043651c0f62d6cfbde6ab.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Diffuse.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Diffuse.png-3eca1e3af93043651c0f62d6cfbde6ab.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
|
||||
|
After Width: | Height: | Size: 108 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b2np3t2e4lvgk"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Emission.png-1febe6b444c696d2245ffe2ab0d154f5.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Emission.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Emission.png-1febe6b444c696d2245ffe2ab0d154f5.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
|
||||
|
After Width: | Height: | Size: 36 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cdmvmtlpohk2b"
|
||||
path="res://.godot/imported/Cube LP_Bake1_PBR StoA_Metalness.png-2674c2aaf2d5c11f7384bcf1bb804f08.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Metalness.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Metalness.png-2674c2aaf2d5c11f7384bcf1bb804f08.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
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=1
|
||||
|
After Width: | Height: | Size: 2.7 MiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://glj22xxa2hxb"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Normal.png-25fac49fb7b0744292879e94e03073ec.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Normal.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Normal.png-25fac49fb7b0744292879e94e03073ec.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=1
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=1
|
||||
roughness/src_normal="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Normal.png"
|
||||
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
|
||||
|
After Width: | Height: | Size: 47 KiB |
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://gtnnut26ft5s"
|
||||
path.s3tc="res://.godot/imported/Cube LP_Bake1_PBR StoA_Roughness.png-63b4f656cffef229c34e6f7c270ae465.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR StoA_Roughness.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR StoA_Roughness.png-63b4f656cffef229c34e6f7c270ae465.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
|
||||
|
After Width: | Height: | Size: 71 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ds8dk70bcilxt"
|
||||
path="res://.godot/imported/Cube LP_Bake1_PBR_Ambient Occlusion.png-a2abe339d671a879b327868cca68fa72.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/SimpleBake_Bakes/Cube LP/Cube LP_Bake1_PBR_Ambient Occlusion.png"
|
||||
dest_files=["res://.godot/imported/Cube LP_Bake1_PBR_Ambient Occlusion.png-a2abe339d671a879b327868cca68fa72.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
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=false
|
||||
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=1
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"asset":{
|
||||
"generator":"Khronos glTF Blender I/O v4.0.44",
|
||||
"version":"2.0"
|
||||
},
|
||||
"scene":0,
|
||||
"scenes":[
|
||||
{
|
||||
"name":"Scene",
|
||||
"nodes":[
|
||||
0
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes":[
|
||||
{
|
||||
"mesh":0,
|
||||
"name":"Cube"
|
||||
}
|
||||
],
|
||||
"materials":[
|
||||
{
|
||||
"doubleSided":true,
|
||||
"name":"Material",
|
||||
"pbrMetallicRoughness":{
|
||||
"baseColorFactor":[
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
1
|
||||
],
|
||||
"metallicFactor":0,
|
||||
"roughnessFactor":0.25196850299835205
|
||||
}
|
||||
}
|
||||
],
|
||||
"meshes":[
|
||||
{
|
||||
"name":"Cube",
|
||||
"primitives":[
|
||||
{
|
||||
"attributes":{
|
||||
"POSITION":0,
|
||||
"NORMAL":1,
|
||||
"TEXCOORD_0":2
|
||||
},
|
||||
"indices":3,
|
||||
"material":0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"accessors":[
|
||||
{
|
||||
"bufferView":0,
|
||||
"componentType":5126,
|
||||
"count":957,
|
||||
"max":[
|
||||
0.968052864074707,
|
||||
0.968052864074707,
|
||||
0.968052864074707
|
||||
],
|
||||
"min":[
|
||||
-0.968052864074707,
|
||||
-0.9680528044700623,
|
||||
-0.968052864074707
|
||||
],
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":1,
|
||||
"componentType":5126,
|
||||
"count":957,
|
||||
"type":"VEC3"
|
||||
},
|
||||
{
|
||||
"bufferView":2,
|
||||
"componentType":5126,
|
||||
"count":957,
|
||||
"type":"VEC2"
|
||||
},
|
||||
{
|
||||
"bufferView":3,
|
||||
"componentType":5123,
|
||||
"count":5184,
|
||||
"type":"SCALAR"
|
||||
}
|
||||
],
|
||||
"bufferViews":[
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":11484,
|
||||
"byteOffset":0,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":11484,
|
||||
"byteOffset":11484,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":7656,
|
||||
"byteOffset":22968,
|
||||
"target":34962
|
||||
},
|
||||
{
|
||||
"buffer":0,
|
||||
"byteLength":10368,
|
||||
"byteOffset":30624,
|
||||
"target":34963
|
||||
}
|
||||
],
|
||||
"buffers":[
|
||||
{
|
||||
"byteLength":40992,
|
||||
"uri":"round-cube.bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://d3kf8vdvy8ihe"
|
||||
path="res://.godot/imported/round-cube.gltf-d15011073af444cfd3419588b7f099b6.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://GameObjects/Round-Cobe/round-cube.gltf"
|
||||
dest_files=["res://.godot/imported/round-cube.gltf-d15011073af444cfd3419588b7f099b6.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/root_script=null
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_name_suffixes=true
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
materials/extract=0
|
||||
materials/extract_format=0
|
||||
materials/extract_path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=2
|
||||
gltf/embedded_image_handling=1
|
||||
568
Main/Main.tscn
|
|
@ -0,0 +1,76 @@
|
|||
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool][GlobalClass ]
|
||||
public partial class CompositorVFXFader: Node
|
||||
{
|
||||
[Export]
|
||||
public CompositorVFX[] effects;
|
||||
|
||||
float _value = 0;
|
||||
[Export( PropertyHint.Range, "0,1")]
|
||||
public float value
|
||||
{
|
||||
get { return _value; }
|
||||
set
|
||||
{
|
||||
_value = value;
|
||||
try
|
||||
{
|
||||
UpdateValue();
|
||||
}
|
||||
catch( Exception e )
|
||||
{
|
||||
this.LogError( e );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateValue()
|
||||
{
|
||||
if ( effects == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var position = _value * effects.Length - 1f; // 0 1 2 3
|
||||
|
||||
var lower = Mathf.Floor( position );
|
||||
var higher = lower + 1;
|
||||
var highAmount = position - lower;
|
||||
var lowAmount = 1f - highAmount;
|
||||
|
||||
if ( lower >= effects.Length - 1)
|
||||
{
|
||||
for ( int i = 0; i < effects.Length; i++ )
|
||||
{
|
||||
effects[ i ].driverValue = i == effects.Length - 1 ? 1f : 0f;
|
||||
}
|
||||
}
|
||||
|
||||
for ( int i = 0; i < effects.Length; i++ )
|
||||
{
|
||||
if ( i != lower && i != higher )
|
||||
{
|
||||
effects[ i ].driverValue = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( i == lower )
|
||||
{
|
||||
effects[ i ].driverValue = lowAmount;
|
||||
}
|
||||
else
|
||||
{
|
||||
effects[ i ].driverValue = highAmount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://drcp6asmxo5j4
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
shader_type spatial;
|
||||
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx, unshaded;
|
||||
stencil_mode write, compare_less_or_equal, 1;
|
||||
|
||||
uniform vec4 albedo : source_color;
|
||||
uniform sampler2D texture_albedo : source_color, filter_linear_mipmap, repeat_enable;
|
||||
|
||||
uniform bool useNormalMap = false;
|
||||
uniform bool flipNormalMapZ = true;
|
||||
uniform sampler2D texture_normal : filter_linear_mipmap, repeat_enable;
|
||||
|
||||
uniform float uvScale;
|
||||
uniform float uvOffset;
|
||||
uniform float uvSpeed;
|
||||
|
||||
uniform vec2 highlightDirection1;
|
||||
uniform float highlightSharpness1: hint_range(0.0, 1.0) = 0.9;
|
||||
uniform float highlightSize1: hint_range(0.0, 1.0) = 0.1;
|
||||
|
||||
uniform vec2 highlightDirection2;
|
||||
uniform float highlightSharpness2: hint_range(0.0, 1.0) = 0.9;
|
||||
uniform float highlightSize2: hint_range(0.0, 1.0) = 0.1;
|
||||
|
||||
varying float albedoU;
|
||||
|
||||
void vertex()
|
||||
{
|
||||
albedoU = VERTEX.y * uvScale + uvOffset + uvSpeed * TIME;
|
||||
}
|
||||
|
||||
vec3 computeNormal( vec3 t, vec3 b, vec3 n, vec2 _UV )
|
||||
{
|
||||
vec3 sampledNormal = texture( texture_normal, _UV ).xyz * 2.0 - 1.0;
|
||||
|
||||
if ( flipNormalMapZ )
|
||||
{
|
||||
sampledNormal.z *= -1.0;
|
||||
}
|
||||
return normalize( mat3( t, b, n ) * sampledNormal );
|
||||
}
|
||||
|
||||
float computeHighlight( vec3 lightDirection, vec3 _NORMAL, float size, float sharpness )
|
||||
{
|
||||
float invSize = 1.0 - pow( size, 3 );
|
||||
float invSharpness = 1.0 - pow( sharpness, 0.1 );
|
||||
float lowerEdge = invSize - invSharpness;
|
||||
float upperEdge = invSize + invSharpness;
|
||||
|
||||
return smoothstep( lowerEdge, upperEdge, dot( _NORMAL, normalize( lightDirection ) ) );
|
||||
}
|
||||
|
||||
void fragment()
|
||||
{
|
||||
vec2 base_uv = UV;
|
||||
|
||||
vec4 albedo_tex = texture(texture_albedo, vec2( albedoU, 0.0 ));
|
||||
ALBEDO = albedo.rgb * albedo_tex.rgb;
|
||||
|
||||
vec3 combinedNormal = NORMAL;
|
||||
|
||||
if ( useNormalMap )
|
||||
{
|
||||
combinedNormal = computeNormal( TANGENT, BINORMAL, NORMAL, UV );
|
||||
}
|
||||
|
||||
float highlight1 = computeHighlight( vec3( highlightDirection1, 1.0 ), combinedNormal, highlightSize1, highlightSharpness1 );
|
||||
float highlight2 = computeHighlight( vec3( highlightDirection2, 1.0 ), combinedNormal, highlightSize2, highlightSharpness2 );
|
||||
|
||||
float highlightsCombined = max( highlight1, highlight2 );
|
||||
ALBEDO = mix( ALBEDO, vec3( 1.0 ), highlightsCombined );
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dc3uyxyngaw1c
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#[compute]
|
||||
#version 450
|
||||
|
||||
// Adapted from https://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html
|
||||
|
||||
// Invocations in the (x, y, z) dimension
|
||||
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
||||
|
||||
layout(rgba16f, set = 0, binding = 0) uniform image2D color_image;
|
||||
layout(rgba16f, set = 1, binding = 0) uniform image2D output_image;
|
||||
|
||||
// Our push constant
|
||||
layout(push_constant, std430) uniform Params {
|
||||
vec2 raster_size;
|
||||
float scale;
|
||||
float bias;
|
||||
float desaturation;
|
||||
} params;
|
||||
|
||||
// The code we want to execute in each invocation
|
||||
void main() {
|
||||
ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
|
||||
ivec2 size = ivec2(params.raster_size);
|
||||
|
||||
if (uv.x >= size.x || uv.y >= size.y) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec4 color = imageLoad(color_image, uv);
|
||||
|
||||
vec3 scale = vec3(1.0) * params.scale;
|
||||
vec3 bias = vec3(-1.0) * params.bias;
|
||||
|
||||
color.rgb = max(vec3(0.0, 0.0, 0.0), color.rgb + bias) * scale;
|
||||
|
||||
// Move each channel a bit towards the highest channel to desaturate while keeping darks
|
||||
float highest_color = max(color.r, max(color.g, color.b));
|
||||
color.rgb = mix(color.rgb, vec3(highest_color), vec3(params.desaturation));
|
||||
|
||||
imageStore(output_image, uv, color);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="glsl"
|
||||
type="RDShaderFile"
|
||||
uid="uid://dl8tsatdw7ylg"
|
||||
path="res://.godot/imported/downsample.glsl-440ef8d666bfe0ff38a98dba9c03351a.res"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/downsample.glsl"
|
||||
dest_files=["res://.godot/imported/downsample.glsl-440ef8d666bfe0ff38a98dba9c03351a.res"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
#[compute]
|
||||
#version 450
|
||||
|
||||
// From https://github.com/BastiaanOlij/RERadialSunRays
|
||||
|
||||
// Invocations in the (x, y, z) dimension
|
||||
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
||||
|
||||
layout(rgba16f, set = 0, binding = 0) uniform restrict readonly image2D input_image;
|
||||
layout(rgba16f, set = 1, binding = 0) uniform restrict writeonly image2D output_image;
|
||||
|
||||
// Our push PushConstant
|
||||
layout(push_constant, std430) uniform Params {
|
||||
vec2 image_size;
|
||||
vec2 blur_size;
|
||||
} params;
|
||||
|
||||
// Gaussian coefficients
|
||||
const int M = 16;
|
||||
const int N = 2 * M + 1;
|
||||
|
||||
// sigma = 10
|
||||
const float coeffs[N] = float[N](
|
||||
0.012318109844189502,
|
||||
0.014381474814203989,
|
||||
0.016623532195728208,
|
||||
0.019024086115486723,
|
||||
0.02155484948872149,
|
||||
0.02417948052890078,
|
||||
0.02685404941667096,
|
||||
0.0295279624870386,
|
||||
0.03214534135442581,
|
||||
0.03464682117793548,
|
||||
0.0369716985390341,
|
||||
0.039060328279673276,
|
||||
0.040856643282313365,
|
||||
0.04231065439216247,
|
||||
0.043380781642569775,
|
||||
0.044035873841196206,
|
||||
0.04425662519949865,
|
||||
0.044035873841196206,
|
||||
0.043380781642569775,
|
||||
0.04231065439216247,
|
||||
0.040856643282313365,
|
||||
0.039060328279673276,
|
||||
0.0369716985390341,
|
||||
0.03464682117793548,
|
||||
0.03214534135442581,
|
||||
0.0295279624870386,
|
||||
0.02685404941667096,
|
||||
0.02417948052890078,
|
||||
0.02155484948872149,
|
||||
0.019024086115486723,
|
||||
0.016623532195728208,
|
||||
0.014381474814203989,
|
||||
0.012318109844189502
|
||||
);
|
||||
|
||||
// The code we want to execute in each invocation
|
||||
void main() {
|
||||
vec2 uv = vec2(gl_GlobalInvocationID.xy);
|
||||
|
||||
// Just in case the effect_size size is not divisable by 8
|
||||
if ((uv.x >= params.image_size.x) || (uv.y >= params.image_size.y)) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec4 blurred = vec4(0.0);
|
||||
float half_size = float(M);
|
||||
|
||||
for (int i = 0; i < N; i ++) {
|
||||
ivec2 uv_adj = ivec2(uv + (params.blur_size * (float(i) - half_size) / half_size));
|
||||
blurred += coeffs[i] * imageLoad(input_image, uv_adj).rgba;
|
||||
}
|
||||
|
||||
imageStore(output_image, ivec2(gl_GlobalInvocationID.xy), blurred);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="glsl"
|
||||
type="RDShaderFile"
|
||||
uid="uid://u7ma88av4j7d"
|
||||
path="res://.godot/imported/gaussian_blur.glsl-ae231c750f05d9216af6ba321c536d92.res"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/gaussian_blur.glsl"
|
||||
dest_files=["res://.godot/imported/gaussian_blur.glsl-ae231c750f05d9216af6ba321c536d92.res"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 448 KiB |
|
|
@ -1,79 +0,0 @@
|
|||
#[compute]
|
||||
#version 450
|
||||
|
||||
// Adapted from https://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html
|
||||
|
||||
// Invocations in the (x, y, z) dimension
|
||||
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
||||
|
||||
layout(rgba16f, set = 0, binding = 0) uniform image2D downsampled_image;
|
||||
layout(rgba16f, set = 1, binding = 0) uniform image2D color_image;
|
||||
layout(set = 2, binding = 0) uniform sampler2D lens_color_ramp;
|
||||
|
||||
// Our push constant
|
||||
layout(push_constant, std430) uniform Params {
|
||||
vec2 raster_size;
|
||||
int ghost_count;
|
||||
float ghost_dispersal;
|
||||
float ca_scale;
|
||||
float halo_width;
|
||||
float halo_weight_power;
|
||||
} params;
|
||||
|
||||
vec3 imageDistorted(
|
||||
in ivec2 texcoord,
|
||||
in vec2 direction, // direction of distortion
|
||||
in vec3 distortion // per-channel distortion factor
|
||||
) {
|
||||
return vec3(
|
||||
imageLoad(downsampled_image, texcoord + ivec2(direction * distortion.r)).r,
|
||||
imageLoad(downsampled_image, texcoord + ivec2(direction * distortion.g)).g,
|
||||
imageLoad(downsampled_image, texcoord + ivec2(direction * distortion.b)).b
|
||||
);
|
||||
}
|
||||
|
||||
// The code we want to execute in each invocation
|
||||
void main() {
|
||||
ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
|
||||
ivec2 size = ivec2(params.raster_size);
|
||||
|
||||
if (uv.x >= size.x || uv.y >= size.y) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec4 color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
vec2 resolution = params.raster_size;
|
||||
|
||||
vec2 texelSize = 1.0 / vec2(resolution);
|
||||
|
||||
vec2 uv_norm = uv / resolution;
|
||||
vec2 texcoord = vec2(1.0) - uv_norm;
|
||||
|
||||
vec2 ghost_vec = (vec2(0.5) - texcoord) * params.ghost_dispersal;
|
||||
|
||||
vec3 distortion = vec3(-1.0, 0.0, 1.0) * params.ca_scale;
|
||||
vec2 direction = normalize(ghost_vec);
|
||||
|
||||
vec3 result = vec3(0.0);
|
||||
for (int i = 0; i < params.ghost_count; ++i) {
|
||||
vec2 offset = fract(texcoord + ghost_vec * float(i));
|
||||
|
||||
float weight = length(vec2(0.5) - offset) / length(vec2(0.5));
|
||||
weight = pow(1.0 - weight, 2.0);
|
||||
|
||||
result += imageDistorted(ivec2(offset * resolution), direction, distortion).rgb * (1.0 / weight);
|
||||
}
|
||||
|
||||
// sample halo:
|
||||
vec2 haloVec = normalize(ghost_vec) * params.halo_width;
|
||||
float weight = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));
|
||||
weight = pow(1.0 - weight, params.halo_weight_power);
|
||||
result += imageDistorted(ivec2((texcoord + haloVec) * resolution), direction, distortion).rgb * weight;
|
||||
|
||||
result *= texture(lens_color_ramp, vec2((length(vec2(0.5) - texcoord) / length(vec2(0.5))), 0.0)).rgb;
|
||||
|
||||
color.rgb = result.rgb;
|
||||
|
||||
imageStore(color_image, uv, color);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="glsl"
|
||||
type="RDShaderFile"
|
||||
uid="uid://bsxtc5veahkcx"
|
||||
path="res://.godot/imported/lens.glsl-a4f9cddc8c0de1b4404d44442bcc4fdd.res"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/lens.glsl"
|
||||
dest_files=["res://.godot/imported/lens.glsl-a4f9cddc8c0de1b4404d44442bcc4fdd.res"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
[gd_resource type="GradientTexture1D" load_steps=2 format=3 uid="uid://dawnxeg62rkll"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_d7nfd"]
|
||||
offsets = PackedFloat32Array(0, 0.08665106, 0.14051522, 0.20608899, 0.28103045, 0.33021078, 0.60421544, 0.6557377, 0.6955503, 0.86885244, 0.9086651, 0.9437939)
|
||||
colors = PackedColorArray(1, 1, 1, 1, 0.98866665, 0.83, 1, 1, 0.8, 1, 0.9833333, 1, 1, 1, 1, 1, 0.8208334, 0.57, 1, 1, 0.8833334, 0.72, 1, 1, 0.7958334, 0.51, 1, 1, 1, 0.35000002, 0.6641668, 1, 1, 0.7725, 0.35000002, 1, 1, 0.94, 0.55, 1, 1, 0.39999998, 0.8800001, 1, 1, 0.984, 0.52, 1)
|
||||
|
||||
[resource]
|
||||
gradient = SubResource("Gradient_d7nfd")
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
[gd_resource type="CompositorEffect" script_class="PostProcessShader" load_steps=6 format=3 uid="uid://cpnwkm1swg8u0"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dawnxeg62rkll" path="res://addons/compositor-lens-flare/lens_color_ramp.tres" id="1_1jo43"]
|
||||
[ext_resource type="Texture2D" uid="uid://detsilp12nioo" path="res://addons/compositor-lens-flare/lens-dirt.png" id="1_v4on2"]
|
||||
[ext_resource type="Script" uid="uid://0dlqdm6ci0xm" path="res://addons/compositor-lens-flare/post_process_shader.gd" id="2_v4on2"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_v4on2"]
|
||||
offsets = PackedFloat32Array(0)
|
||||
colors = PackedColorArray(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_wwdrl"]
|
||||
gradient = SubResource("Gradient_v4on2")
|
||||
width = 1
|
||||
|
||||
[resource]
|
||||
resource_local_to_scene = false
|
||||
resource_name = ""
|
||||
enabled = true
|
||||
effect_callback_type = 4
|
||||
needs_motion_vectors = false
|
||||
needs_normal_roughness = false
|
||||
script = ExtResource("2_v4on2")
|
||||
glare_streak_count = 4
|
||||
glare_attenuation = 0.9839
|
||||
glare_samples = 2
|
||||
flare_color_ramp = ExtResource("1_1jo43")
|
||||
overlay_dirt_texture = ExtResource("1_v4on2")
|
||||
overlay_white_texture = SubResource("GradientTexture1D_wwdrl")
|
||||
metadata/_custom_type_script = "uid://0dlqdm6ci0xm"
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#[compute]
|
||||
#version 450
|
||||
|
||||
// Invocations in the (x, y, z) dimension
|
||||
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
||||
|
||||
layout(rgba16f, set = 0, binding = 0) uniform image2D overlay_image;
|
||||
layout(rgba16f, set = 1, binding = 0) uniform image2D color_image;
|
||||
layout(set = 2, binding = 0) uniform sampler2D dirt_texture;
|
||||
|
||||
// Our push PushConstant
|
||||
layout(push_constant, std430) uniform Params {
|
||||
vec2 render_size;
|
||||
float res;
|
||||
float dirt_power;
|
||||
} params;
|
||||
|
||||
// The code we want to execute in each invocation
|
||||
void main() {
|
||||
ivec2 render_size = ivec2(params.render_size.xy);
|
||||
|
||||
ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
|
||||
|
||||
// Just in case the render_size size is not divisable by 8
|
||||
if ((uv.x >= render_size.x) || (uv.y >= render_size.y)) {
|
||||
return;
|
||||
}
|
||||
|
||||
float dirt = texture(dirt_texture, vec2(uv) / vec2(render_size)).r;
|
||||
|
||||
vec4 color = imageLoad(color_image, uv);
|
||||
vec4 overlay = imageLoad(overlay_image, uv) * mix(1.0, dirt, params.dirt_power);
|
||||
|
||||
color += overlay;
|
||||
|
||||
imageStore(color_image, uv, color);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="glsl"
|
||||
type="RDShaderFile"
|
||||
uid="uid://c1rq8g3b4ci41"
|
||||
path="res://.godot/imported/overlay.glsl-39d5630b163e8c81fa676fad2b9ace7e.res"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/overlay.glsl"
|
||||
dest_files=["res://.godot/imported/overlay.glsl-39d5630b163e8c81fa676fad2b9ace7e.res"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,543 +0,0 @@
|
|||
@tool
|
||||
extends CompositorEffect
|
||||
class_name PostProcessShader
|
||||
|
||||
# Lens flare effect based on https://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html
|
||||
# References used for CompositorEffect structure:
|
||||
# - https://github.com/pink-arcana/godot-distance-field-outlines
|
||||
# - https://github.com/BastiaanOlij/RERadialSunRays
|
||||
|
||||
var context := "LENS_FLARE"
|
||||
|
||||
var downsample_shader_file = load("res://addons/compositor-lens-flare/downsample.glsl")
|
||||
var lens_shader_file = load("res://addons/compositor-lens-flare/lens.glsl")
|
||||
var blur_shader_file = load("res://addons/compositor-lens-flare/gaussian_blur.glsl")
|
||||
var overlay_shader_file = load("res://addons/compositor-lens-flare/overlay.glsl")
|
||||
var streak_shader_file = load("res://addons/compositor-lens-flare/streak.glsl")
|
||||
|
||||
@export_tool_button("Reload", "Callable") var reload_action = reload
|
||||
|
||||
@export_group("Downsample", "downsample_")
|
||||
@export_range(0.0, 5.0) var downsample_scale := 0.2
|
||||
@export_range(0.0, 5.0) var downsample_bias := 0.6
|
||||
@export_range(0.0, 1.0) var downsample_desaturation := 0.5
|
||||
|
||||
@export_group("Glare", "glare_")
|
||||
@export_range(0, 12) var glare_streak_count := 6
|
||||
@export_range(0.8, 1.0) var glare_attenuation: float = 0.975
|
||||
@export_range(1, 12) var glare_samples: int = 4
|
||||
|
||||
@export_group("Lens Flare", "flare_")
|
||||
@export var flare_color_ramp: Texture2D
|
||||
@export_range(1, 16) var flare_ghost_count := 8
|
||||
@export_range(0.0, 2.0) var flare_ghost_dispersal := 0.25
|
||||
@export_range(0.0, 10.0) var flare_chromatic_abberation_scale := 7.0
|
||||
@export_range(0.0, 1.0) var flare_halo_width := 0.4
|
||||
@export_range(1.0, 10.0) var flare_halo_weight_power := 5.0
|
||||
|
||||
@export_group("Guassian Blur", "gaussian_blur_")
|
||||
@export_range(5.0, 50.0) var gaussian_blur_size: float = 16.0
|
||||
|
||||
@export_group("Overlay", "overlay_")
|
||||
@export var overlay_dirt_texture: Texture2D
|
||||
@export var overlay_white_texture: Texture2D
|
||||
@export_range(0.0, 1.0) var overlay_dirt_texture_power := 0.6
|
||||
|
||||
var downsample_shader: RID
|
||||
var downsample_pipeline: RID
|
||||
|
||||
var lens_shader: RID
|
||||
var lens_pipeline: RID
|
||||
|
||||
var blur_shader: RID
|
||||
var blur_pipeline: RID
|
||||
|
||||
var overlay_shader: RID
|
||||
var overlay_pipeline: RID
|
||||
|
||||
var streak_shader: RID
|
||||
var streak_pipeline: RID
|
||||
|
||||
var rd: RenderingDevice
|
||||
|
||||
var mutex: Mutex = Mutex.new()
|
||||
var shader_is_dirty: bool = true
|
||||
|
||||
var clamp_linear_texture_sampler: RID
|
||||
|
||||
# Called when this resource is constructed.
|
||||
func _init():
|
||||
effect_callback_type = EFFECT_CALLBACK_TYPE_POST_TRANSPARENT
|
||||
RenderingServer.call_on_render_thread(_initialize_compute)
|
||||
|
||||
|
||||
# System notifications, we want to react on the notification that
|
||||
# alerts us we are about to be destroyed.
|
||||
func _notification(what):
|
||||
if what == NOTIFICATION_PREDELETE:
|
||||
cleanup()
|
||||
|
||||
|
||||
func cleanup():
|
||||
if lens_shader.is_valid():
|
||||
rd.free_rid(lens_shader)
|
||||
if downsample_shader.is_valid():
|
||||
rd.free_rid(downsample_shader)
|
||||
if blur_shader.is_valid():
|
||||
rd.free_rid(blur_shader)
|
||||
if overlay_shader.is_valid():
|
||||
rd.free_rid(overlay_shader)
|
||||
if streak_shader.is_valid():
|
||||
rd.free_rid(streak_shader)
|
||||
|
||||
|
||||
func reload():
|
||||
cleanup()
|
||||
|
||||
RenderingServer.call_on_render_thread(_initialize_compute)
|
||||
|
||||
|
||||
func _initialize_compute():
|
||||
rd = RenderingServer.get_rendering_device()
|
||||
|
||||
# Create samplers
|
||||
clamp_linear_texture_sampler = create_texture_sampler()
|
||||
|
||||
# Compile all shaders and create pipelines
|
||||
|
||||
var lens_shader_spirv: RDShaderSPIRV = lens_shader_file.get_spirv()
|
||||
|
||||
if lens_shader_spirv.compile_error_compute != "":
|
||||
push_error(lens_shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
lens_shader = rd.shader_create_from_spirv(lens_shader_spirv)
|
||||
if not lens_shader.is_valid():
|
||||
return false
|
||||
|
||||
lens_pipeline = rd.compute_pipeline_create(lens_shader)
|
||||
|
||||
var downsample_shader_spirv: RDShaderSPIRV = downsample_shader_file.get_spirv()
|
||||
|
||||
if downsample_shader_spirv.compile_error_compute != "":
|
||||
push_error(downsample_shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
downsample_shader = rd.shader_create_from_spirv(downsample_shader_spirv)
|
||||
if not downsample_shader.is_valid():
|
||||
return false
|
||||
|
||||
downsample_pipeline = rd.compute_pipeline_create(downsample_shader)
|
||||
|
||||
var blur_shader_spirv: RDShaderSPIRV = blur_shader_file.get_spirv()
|
||||
|
||||
if blur_shader_spirv.compile_error_compute != "":
|
||||
push_error(blur_shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
blur_shader = rd.shader_create_from_spirv(blur_shader_spirv)
|
||||
if not blur_shader.is_valid():
|
||||
return false
|
||||
|
||||
blur_pipeline = rd.compute_pipeline_create(blur_shader)
|
||||
|
||||
var overlay_shader_spirv: RDShaderSPIRV = overlay_shader_file.get_spirv()
|
||||
|
||||
if overlay_shader_spirv.compile_error_compute != "":
|
||||
push_error(overlay_shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
overlay_shader = rd.shader_create_from_spirv(overlay_shader_spirv)
|
||||
if not overlay_shader.is_valid():
|
||||
return false
|
||||
|
||||
overlay_pipeline = rd.compute_pipeline_create(overlay_shader)
|
||||
|
||||
var streak_shader_spirv: RDShaderSPIRV = streak_shader_file.get_spirv()
|
||||
|
||||
if streak_shader_spirv.compile_error_compute != "":
|
||||
push_error(streak_shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
streak_shader = rd.shader_create_from_spirv(streak_shader_spirv)
|
||||
if not streak_shader.is_valid():
|
||||
return false
|
||||
|
||||
streak_pipeline = rd.compute_pipeline_create(streak_shader)
|
||||
|
||||
|
||||
func compile_shader(shader_file, shader, pipeline):
|
||||
var shader_spirv: RDShaderSPIRV = shader_file.get_spirv()
|
||||
|
||||
if shader_spirv.compile_error_compute != "":
|
||||
push_error(shader_spirv.compile_error_compute)
|
||||
return false
|
||||
|
||||
shader = rd.shader_create_from_spirv(shader_spirv)
|
||||
if not shader.is_valid():
|
||||
return false
|
||||
|
||||
pipeline = rd.compute_pipeline_create(shader)
|
||||
return pipeline.is_valid()
|
||||
|
||||
|
||||
func validate_pipelines():
|
||||
return lens_pipeline.is_valid() and downsample_pipeline.is_valid() \
|
||||
and blur_pipeline.is_valid() and streak_pipeline.is_valid() \
|
||||
and overlay_pipeline.is_valid()
|
||||
|
||||
|
||||
func get_image_uniform(image : RID, binding : int = 0) -> RDUniform:
|
||||
var uniform : RDUniform = RDUniform.new()
|
||||
uniform.uniform_type = RenderingDevice.UNIFORM_TYPE_IMAGE
|
||||
uniform.binding = binding
|
||||
uniform.add_id(image)
|
||||
|
||||
return uniform
|
||||
|
||||
|
||||
func create_texture_sampler():
|
||||
var sampler_state = RDSamplerState.new()
|
||||
sampler_state.repeat_u = RenderingDevice.SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE
|
||||
sampler_state.repeat_v = RenderingDevice.SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE
|
||||
sampler_state.repeat_w = RenderingDevice.SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE
|
||||
sampler_state.mag_filter = RenderingDevice.SAMPLER_FILTER_LINEAR
|
||||
sampler_state.min_filter = RenderingDevice.SAMPLER_FILTER_LINEAR
|
||||
sampler_state.mip_filter = RenderingDevice.SAMPLER_FILTER_LINEAR
|
||||
|
||||
return rd.sampler_create(sampler_state)
|
||||
|
||||
|
||||
func get_texture_uniform(texture: Texture, binding : int = 0) -> RDUniform:
|
||||
var uniform : RDUniform = RDUniform.new()
|
||||
uniform.uniform_type = RenderingDevice.UNIFORM_TYPE_SAMPLER_WITH_TEXTURE
|
||||
uniform.binding = binding
|
||||
uniform.add_id(clamp_linear_texture_sampler)
|
||||
uniform.add_id(RenderingServer.texture_get_rd_texture(texture.get_rid(), true))
|
||||
|
||||
return uniform
|
||||
|
||||
|
||||
# Called by the rendering thread every frame.
|
||||
func _render_callback(p_effect_callback_type, p_render_data):
|
||||
if rd and p_effect_callback_type == EFFECT_CALLBACK_TYPE_POST_TRANSPARENT \
|
||||
and validate_pipelines():
|
||||
# Get our render scene buffers object, this gives us access to our render buffers.
|
||||
# Note that implementation differs per renderer hence the need for the cast.
|
||||
var render_scene_buffers: RenderSceneBuffersRD = p_render_data.get_render_scene_buffers()
|
||||
if render_scene_buffers:
|
||||
# Get our render size, this is the 3D render resolution!
|
||||
var size = render_scene_buffers.get_internal_size()
|
||||
if size.x == 0 and size.y == 0:
|
||||
return
|
||||
|
||||
# Compute shader groups
|
||||
var x_groups = (size.x - 1) / 8 + 1
|
||||
var y_groups = (size.y - 1) / 8 + 1
|
||||
var z_groups = 1
|
||||
|
||||
# Loop through views just in case we're doing stereo rendering.
|
||||
# No extra cost if this is mono.
|
||||
var view_count = render_scene_buffers.get_view_count()
|
||||
for view in range(view_count):
|
||||
# Get the RID for our color image, we will be reading from and writing to it.
|
||||
var input_image = render_scene_buffers.get_color_layer(view)
|
||||
|
||||
var usage_bits := RenderingDevice.TEXTURE_USAGE_SAMPLING_BIT \
|
||||
| RenderingDevice.TEXTURE_USAGE_STORAGE_BIT
|
||||
|
||||
# Create textures (or get from cache if already created)
|
||||
render_scene_buffers.create_texture(
|
||||
context,
|
||||
"Downsampled",
|
||||
RenderingDevice.DATA_FORMAT_R16G16B16A16_SFLOAT,
|
||||
usage_bits,
|
||||
RenderingDevice.TEXTURE_SAMPLES_1,
|
||||
size, 1, 1, true, false)
|
||||
render_scene_buffers.create_texture(
|
||||
context,
|
||||
"BlurLeft",
|
||||
RenderingDevice.DATA_FORMAT_R16G16B16A16_SFLOAT,
|
||||
usage_bits,
|
||||
RenderingDevice.TEXTURE_SAMPLES_1,
|
||||
size, 1, 1, true, false)
|
||||
render_scene_buffers.create_texture(
|
||||
context,
|
||||
"BlurRight",
|
||||
RenderingDevice.DATA_FORMAT_R16G16B16A16_SFLOAT,
|
||||
usage_bits,
|
||||
RenderingDevice.TEXTURE_SAMPLES_1,
|
||||
size, 1, 1, true, false)
|
||||
render_scene_buffers.create_texture(
|
||||
context,
|
||||
"Ping",
|
||||
RenderingDevice.DATA_FORMAT_R16G16B16A16_SFLOAT,
|
||||
usage_bits,
|
||||
RenderingDevice.TEXTURE_SAMPLES_1,
|
||||
size, 1, 1, true, false)
|
||||
render_scene_buffers.create_texture(
|
||||
context,
|
||||
"Pong",
|
||||
RenderingDevice.DATA_FORMAT_R16G16B16A16_SFLOAT,
|
||||
usage_bits,
|
||||
RenderingDevice.TEXTURE_SAMPLES_1,
|
||||
size, 1, 1, true, false)
|
||||
|
||||
var color_uniform: RDUniform = RDUniform.new()
|
||||
color_uniform.uniform_type = RenderingDevice.UNIFORM_TYPE_IMAGE
|
||||
color_uniform.binding = 0
|
||||
color_uniform.add_id(input_image)
|
||||
|
||||
var downsampled_uniform = get_image_uniform(render_scene_buffers.get_texture(context, "Downsampled"))
|
||||
var ping_uniform = get_image_uniform(render_scene_buffers.get_texture(context, "Ping"))
|
||||
var pong_uniform = get_image_uniform(render_scene_buffers.get_texture(context, "Pong"))
|
||||
var blur_left_uniform = get_image_uniform(render_scene_buffers.get_texture(context, "BlurLeft"))
|
||||
var blur_right_uniform = get_image_uniform(render_scene_buffers.get_texture(context, "BlurRight"))
|
||||
|
||||
# Setup done
|
||||
|
||||
# Step 1: Downsample
|
||||
# Extracts only bright bits from texture, making the rest black
|
||||
|
||||
var downsample_uniform_set_1 := UniformSetCacheRD.get_cache(lens_shader, 0, [ color_uniform ])
|
||||
var downsample_uniform_set_2 := UniformSetCacheRD.get_cache(lens_shader, 1, [ downsampled_uniform ])
|
||||
|
||||
var downsample_push_constant := PackedByteArray()
|
||||
downsample_push_constant.resize(32)
|
||||
downsample_push_constant.encode_float(0, size.x)
|
||||
downsample_push_constant.encode_float(4, size.y)
|
||||
downsample_push_constant.encode_float(8, downsample_scale)
|
||||
downsample_push_constant.encode_float(12, downsample_bias)
|
||||
downsample_push_constant.encode_float(16, downsample_desaturation)
|
||||
|
||||
var compute_list := rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, downsample_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, downsample_uniform_set_1, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, downsample_uniform_set_2, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, downsample_push_constant, downsample_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Step 2: Light streak
|
||||
# Blurs the texture into any number of directions and overlays the result onto the
|
||||
# color buffer
|
||||
|
||||
for angle_i in range(glare_streak_count): # hexagonal streaks
|
||||
var angle_here = ((PI * 2.0) / glare_streak_count) * angle_i
|
||||
var direction = Vector2(1.0, 0.0).rotated(angle_here)
|
||||
|
||||
# We have a lot of code duplication here instead of looping because we need to
|
||||
# ping-pong the "from" and "to" textures:
|
||||
# downsampled -> ping -> pong -> ping -> pong -> color
|
||||
# TODO: could probably be cleaned up with a lambda
|
||||
|
||||
var streak_uniform_set
|
||||
var streak_uniform_set2
|
||||
|
||||
# Iteration 1
|
||||
var streak_push_constant: PackedByteArray = PackedByteArray()
|
||||
streak_push_constant.resize(32)
|
||||
streak_push_constant.encode_float(0, size.x)
|
||||
streak_push_constant.encode_float(4, size.y)
|
||||
streak_push_constant.encode_float(8, direction.x * 1.0) # Direction
|
||||
streak_push_constant.encode_float(12, direction.y * 1.0)
|
||||
streak_push_constant.encode_s32(16, glare_samples) # Samples
|
||||
streak_push_constant.encode_float(20, glare_attenuation) # Attenuation
|
||||
streak_push_constant.encode_s32(24, 0) # Iteration
|
||||
|
||||
streak_uniform_set = UniformSetCacheRD.get_cache(streak_shader, 0, [downsampled_uniform])
|
||||
streak_uniform_set2 = UniformSetCacheRD.get_cache(streak_shader, 1, [ping_uniform])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, streak_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set2, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, streak_push_constant, streak_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Iteration 2
|
||||
streak_push_constant = PackedByteArray()
|
||||
streak_push_constant.resize(32)
|
||||
streak_push_constant.encode_float(0, size.x)
|
||||
streak_push_constant.encode_float(4, size.y)
|
||||
streak_push_constant.encode_float(8, direction.x * 1.0) # Direction
|
||||
streak_push_constant.encode_float(12, direction.y * 1.0)
|
||||
streak_push_constant.encode_s32(16, glare_samples) # Samples
|
||||
streak_push_constant.encode_float(20, glare_attenuation) # Attenuation
|
||||
streak_push_constant.encode_s32(24, 1) # Iteration
|
||||
|
||||
streak_uniform_set = UniformSetCacheRD.get_cache(streak_shader, 0, [ping_uniform])
|
||||
streak_uniform_set2 = UniformSetCacheRD.get_cache(streak_shader, 1, [pong_uniform])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, streak_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set2, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, streak_push_constant, streak_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Iteration 3
|
||||
streak_push_constant = PackedByteArray()
|
||||
streak_push_constant.resize(32)
|
||||
streak_push_constant.encode_float(0, size.x)
|
||||
streak_push_constant.encode_float(4, size.y)
|
||||
streak_push_constant.encode_float(8, direction.x * 1.0) # Direction
|
||||
streak_push_constant.encode_float(12, direction.y * 1.0)
|
||||
streak_push_constant.encode_s32(16, glare_samples) # Samples
|
||||
streak_push_constant.encode_float(20, glare_attenuation) # Attenuation
|
||||
streak_push_constant.encode_s32(24, 2) # Iteration
|
||||
|
||||
streak_uniform_set = UniformSetCacheRD.get_cache(streak_shader, 0, [pong_uniform])
|
||||
streak_uniform_set2 = UniformSetCacheRD.get_cache(streak_shader, 1, [ping_uniform])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, streak_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set2, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, streak_push_constant, streak_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Iteration 4
|
||||
streak_push_constant = PackedByteArray()
|
||||
streak_push_constant.resize(32)
|
||||
streak_push_constant.encode_float(0, size.x)
|
||||
streak_push_constant.encode_float(4, size.y)
|
||||
streak_push_constant.encode_float(8, direction.x * 1.0) # Direction
|
||||
streak_push_constant.encode_float(12, direction.y * 1.0)
|
||||
streak_push_constant.encode_s32(16, glare_samples) # Samples
|
||||
streak_push_constant.encode_float(20, glare_attenuation) # Attenuation
|
||||
streak_push_constant.encode_s32(24, 3) # Iteration
|
||||
|
||||
streak_uniform_set = UniformSetCacheRD.get_cache(streak_shader, 0, [ping_uniform])
|
||||
streak_uniform_set2 = UniformSetCacheRD.get_cache(streak_shader, 1, [pong_uniform])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, streak_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, streak_uniform_set2, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, streak_push_constant, streak_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Blur onto color
|
||||
var overlay_uniform = get_texture_uniform(overlay_white_texture)
|
||||
|
||||
var overlay_uniform_set_1 = UniformSetCacheRD.get_cache(overlay_shader, 0, [ pong_uniform ])
|
||||
var overlay_uniform_set_2 = UniformSetCacheRD.get_cache(overlay_shader, 1, [ color_uniform ])
|
||||
var overlay_uniform_set_3 = UniformSetCacheRD.get_cache(overlay_shader, 2, [ overlay_uniform ])
|
||||
|
||||
var overlay_push_constant: PackedFloat32Array = PackedFloat32Array()
|
||||
overlay_push_constant.push_back(size.x)
|
||||
overlay_push_constant.push_back(size.y)
|
||||
overlay_push_constant.push_back(0.0) # Padding
|
||||
overlay_push_constant.push_back(0.0)
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, overlay_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_1, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_2, 1)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_3, 2)
|
||||
rd.compute_list_set_push_constant(compute_list, overlay_push_constant.to_byte_array(), overlay_push_constant.size() * 4)
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, 1)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Step 3: Lens Flare
|
||||
# Create ghosts and halos from the downsampled image
|
||||
# (Note: the light streak result is not used in the lens flare processing)
|
||||
|
||||
var color_ramp_uniform = get_texture_uniform(flare_color_ramp)
|
||||
|
||||
var lens_flare_uniform_set_1 = UniformSetCacheRD.get_cache(lens_shader, 0, [ downsampled_uniform ])
|
||||
var lens_flare_uniform_set_2 = UniformSetCacheRD.get_cache(lens_shader, 1, [pong_uniform])
|
||||
var lens_flare_uniform_set_3 = UniformSetCacheRD.get_cache(lens_shader, 2, [color_ramp_uniform])
|
||||
|
||||
var lens_flare_push_constant := PackedByteArray()
|
||||
lens_flare_push_constant.resize(32)
|
||||
lens_flare_push_constant.encode_float(0, size.x)
|
||||
lens_flare_push_constant.encode_float(4, size.y)
|
||||
lens_flare_push_constant.encode_s32(8, flare_ghost_count)
|
||||
lens_flare_push_constant.encode_float(12, flare_ghost_dispersal)
|
||||
lens_flare_push_constant.encode_float(16, flare_chromatic_abberation_scale)
|
||||
lens_flare_push_constant.encode_float(20, flare_halo_width)
|
||||
lens_flare_push_constant.encode_float(24, flare_halo_weight_power)
|
||||
|
||||
# Run lens flare
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, lens_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, lens_flare_uniform_set_1, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, lens_flare_uniform_set_2, 1)
|
||||
rd.compute_list_bind_uniform_set(compute_list, lens_flare_uniform_set_3, 2)
|
||||
rd.compute_list_set_push_constant(compute_list, lens_flare_push_constant, lens_flare_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, z_groups)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Step 4: Blur
|
||||
# Horizontal, then vertical blur of the lens flare result to make the ghosts less
|
||||
# sharp
|
||||
|
||||
# Horizontal pass
|
||||
var blur_push_constant: PackedFloat32Array = PackedFloat32Array()
|
||||
blur_push_constant.push_back(size.x)
|
||||
blur_push_constant.push_back(size.y)
|
||||
blur_push_constant.push_back(gaussian_blur_size)
|
||||
blur_push_constant.push_back(0.0)
|
||||
|
||||
var blur_color_uniform_set = UniformSetCacheRD.get_cache(blur_shader, 0, [ pong_uniform ])
|
||||
var blur_texture_uniform_set = UniformSetCacheRD.get_cache(blur_shader, 1, [ ping_uniform ])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, blur_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, blur_color_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, blur_texture_uniform_set, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, blur_push_constant.to_byte_array(), blur_push_constant.size() * 4)
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, 1)
|
||||
rd.compute_list_end()
|
||||
|
||||
rd.draw_command_end_label()
|
||||
|
||||
# Vertical pass (using the horizontal result)
|
||||
blur_push_constant = PackedFloat32Array()
|
||||
blur_push_constant.push_back(size.x)
|
||||
blur_push_constant.push_back(size.y)
|
||||
blur_push_constant.push_back(0.0)
|
||||
blur_push_constant.push_back(gaussian_blur_size)
|
||||
|
||||
blur_color_uniform_set = UniformSetCacheRD.get_cache(blur_shader, 0, [ ping_uniform ])
|
||||
blur_texture_uniform_set = UniformSetCacheRD.get_cache(blur_shader, 1, [ pong_uniform ])
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, blur_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, blur_color_uniform_set, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, blur_texture_uniform_set, 1)
|
||||
rd.compute_list_set_push_constant(compute_list, blur_push_constant.to_byte_array(), blur_push_constant.size() * 4)
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, 1)
|
||||
rd.compute_list_end()
|
||||
|
||||
# Step 5: Overlay
|
||||
# Blend the blurred lens flares onto the color buffer (which already includes the
|
||||
# light streaks created in step 2)
|
||||
|
||||
var overlay_uniform_set_1 = UniformSetCacheRD.get_cache(overlay_shader, 0, [ pong_uniform ])
|
||||
var overlay_uniform_set_2 = UniformSetCacheRD.get_cache(overlay_shader, 1, [ color_uniform ])
|
||||
|
||||
var dirt_uniform = get_texture_uniform(overlay_dirt_texture)
|
||||
var overlay_uniform_set_3 = UniformSetCacheRD.get_cache(overlay_shader, 2, [ dirt_uniform ])
|
||||
|
||||
var overlay_push_constant = PackedByteArray()
|
||||
overlay_push_constant.resize(16)
|
||||
overlay_push_constant.encode_float(0, size.x)
|
||||
overlay_push_constant.encode_float(4, size.y)
|
||||
overlay_push_constant.encode_float(8, 0.0) # Padding
|
||||
overlay_push_constant.encode_float(12, overlay_dirt_texture_power)
|
||||
|
||||
compute_list = rd.compute_list_begin()
|
||||
rd.compute_list_bind_compute_pipeline(compute_list, overlay_pipeline)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_1, 0)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_2, 1)
|
||||
rd.compute_list_bind_uniform_set(compute_list, overlay_uniform_set_3, 2)
|
||||
rd.compute_list_set_push_constant(compute_list, overlay_push_constant, overlay_push_constant.size())
|
||||
rd.compute_list_dispatch(compute_list, x_groups, y_groups, 1)
|
||||
rd.compute_list_end()
|
||||
|
|
@ -1 +0,0 @@
|
|||
uid://0dlqdm6ci0xm
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#[compute]
|
||||
#version 450
|
||||
|
||||
// Adapted from https://chrisoat.com/papers/Oat-ScenePostprocessing.pdf
|
||||
|
||||
// Invocations in the (x, y, z) dimension
|
||||
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
||||
|
||||
layout(rgba16f, set = 0, binding = 0) uniform image2D light_image;
|
||||
layout(rgba16f, set = 1, binding = 0) uniform image2D out_image;
|
||||
|
||||
// Our push constant
|
||||
layout(push_constant, std430) uniform Params {
|
||||
vec2 raster_size;
|
||||
vec2 streak_direction;
|
||||
int streak_samples;
|
||||
float attenuation;
|
||||
int iteration;
|
||||
} params;
|
||||
|
||||
// The code we want to execute in each invocation
|
||||
void main() {
|
||||
ivec2 uv = ivec2(gl_GlobalInvocationID.xy);
|
||||
ivec2 size = ivec2(params.raster_size);
|
||||
|
||||
if (uv.x >= size.x || uv.y >= size.y) {
|
||||
return;
|
||||
}
|
||||
|
||||
vec4 new_color = vec4(0.0, 0.0, 0.0, 1.0); //imageLoad(light_image, uv);
|
||||
|
||||
float b = pow(params.streak_samples, params.iteration);
|
||||
|
||||
for (int sample_num = 0; sample_num < params.streak_samples; sample_num++) {
|
||||
float weight = pow(params.attenuation, b * sample_num);
|
||||
|
||||
ivec2 texture_coordinates_here = uv + ivec2(params.streak_direction * b * sample_num);
|
||||
|
||||
new_color.rgb += clamp(weight, 0.0, 1.0) * imageLoad(light_image, texture_coordinates_here).rgb;
|
||||
}
|
||||
|
||||
imageStore(out_image, uv, new_color);
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[remap]
|
||||
|
||||
importer="glsl"
|
||||
type="RDShaderFile"
|
||||
uid="uid://c3wo2okvinjbs"
|
||||
path="res://.godot/imported/streak.glsl-e84466ab4d8ec552c71d8362b0bf731b.res"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/compositor-lens-flare/streak.glsl"
|
||||
dest_files=["res://.godot/imported/streak.glsl-e84466ab4d8ec552c71d8362b0bf731b.res"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit eff4b5e146ebc6aceb90004a52cffd3121167661
|
||||
Subproject commit 122d885ebdf6fdfb9ed2209306a85fff43d88681
|
||||