Commit 3c064c85 authored by Michael Alexsander's avatar Michael Alexsander Committed by Ville SkyttΓ€
Browse files

Add Godot engine files

parent 3a116222
......@@ -523,6 +523,38 @@ command to generate the output files.
<match type="string" value="(;FF[4]" offset="0"/>
</magic>
</mime-type>
<mime-type type="application/x-godot-project">
<comment>Godot Engine project</comment>
<sub-class-of type="text/plain"/>
<glob pattern="project.godot"/>
</mime-type>
<mime-type type="application/x-godot-resource">
<comment>Godot Engine resource</comment>
<glob pattern="*.res"/>
<glob pattern="*.tres"/>
<magic>
<match type="string" value="[gd_resource " offset="0"/>
</magic>
</mime-type>
<mime-type type="application/x-godot-scene">
<comment>Godot Engine scene</comment>
<glob pattern="*.scn"/>
<glob pattern="*.tscn"/>
<glob pattern="*.escn"/>
<magic>
<match type="string" value="[gd_scene " offset="0"/>
</magic>
</mime-type>
<mime-type type="application/x-godot-shader">
<comment>Godot Engine shader</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.gdshader"/>
</mime-type>
<mime-type type="application/x-gdscript">
<comment>GDScript script</comment>
<sub-class-of type="text/plain"/>
<glob pattern="*.gd"/>
</mime-type>
<mime-type type="application/xliff+xml">
<comment>XLIFF translation file</comment>
<acronym>XLIFF</acronym>
......
......@@ -869,6 +869,16 @@ test.pysu application/x-pyspread-spreadsheet
# Dart source code
test.dart text/x-dart oxo
# Godot files
project.godot application/x-godot-project ox
test.res application/x-godot-resource ox
test.tres application/x-godot-resource
test.scn application/x-godot-scene ox
test.tscn application/x-godot-scene
test.escn application/x-godot-scene
test.gdshader application/x-godot-shader ox
test.gd application/x-gdscript ox
# Kotlin source code
test.kt text/x-kotlin ox
......@@ -880,4 +890,4 @@ test.avifs image/avif
# Org-mode file
test.org text/org ox
# OpenZIM file
test.zim application/x-openzim
\ No newline at end of file
test.zim application/x-openzim
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
[application]
config/name="New Game Project"
config/icon="res://icon.png"
[rendering]
environment/default_environment="res://default_env.tres"
[gd_scene load_steps=1 format=2]
[sub_resource id=1 type="Shader"]
resource_name = "Shader Nodetree"
code = "shader_type spatial;
render_mode blend_mix, depth_draw_always, cull_back, diffuse_burley, specular_schlick_ggx;
void node_bsdf_principled(vec4 color, float subsurface, vec4 subsurface_color,
float metallic, float specular, float roughness, float clearcoat,
float clearcoat_roughness, float anisotropy, float transmission,
float IOR, out vec3 albedo, out float sss_strength_out,
out float metallic_out, out float specular_out,
out float roughness_out, out float clearcoat_out,
out float clearcoat_gloss_out, out float anisotropy_out,
out float transmission_out, out float ior) {
metallic = clamp(metallic, 0.0, 1.0);
transmission = clamp(transmission, 0.0, 1.0);
subsurface = subsurface * (1.0 - metallic);
albedo = mix(color.rgb, subsurface_color.rgb, subsurface);
sss_strength_out = subsurface;
metallic_out = metallic;
specular_out = pow((IOR - 1.0)/(IOR + 1.0), 2)/0.08;
roughness_out = roughness;
clearcoat_out = clearcoat * (1.0 - transmission);
clearcoat_gloss_out = 1.0 - clearcoat_roughness;
anisotropy_out = clamp(anisotropy, 0.0, 1.0);
transmission_out = (1.0 - transmission) * (1.0 - metallic);
ior = IOR;
}
void vertex () {
}
void fragment () {
// node: 'Principled BSDF'
// type: 'ShaderNodeBsdfPrincipled'
// input sockets handling
vec4 node0_in0_basecolor = vec4(0.800000011920929, 0.800000011920929,
0.800000011920929, 1.0);
float node0_in1_subsurface = float(0.0);
vec3 node0_in2_subsurfaceradius = vec3(1.0, 0.20000000298023224,
0.10000000149011612);
vec4 node0_in3_subsurfacecolor = vec4(0.800000011920929, 0.800000011920929,
0.800000011920929, 1.0);
float node0_in4_metallic = float(0.0);
float node0_in5_specular = float(0.5);
float node0_in6_speculartint = float(0.0);
float node0_in7_roughness = float(0.4000000059604645);
float node0_in8_anisotropic = float(0.0);
float node0_in9_anisotropicrotation = float(0.0);
float node0_in10_sheen = float(0.0);
float node0_in11_sheentint = float(0.5);
float node0_in12_clearcoat = float(0.0);
float node0_in13_clearcoatroughness = float(0.029999999329447746);
float node0_in14_ior = float(1.4500000476837158);
float node0_in15_transmission = float(0.0);
float node0_in16_transmissionroughness = float(0.0);
vec4 node0_in17_emission = vec4(0.0, 0.0, 0.0, 1.0);
float node0_in18_alpha = float(1.0);
vec3 node0_in19_normal = NORMAL;
vec3 node0_in20_clearcoatnormal = vec3(0.0, 0.0, 0.0);
vec3 node0_in21_tangent = TANGENT;
// output sockets definitions
vec3 node0_bsdf_out0_albedo;
float node0_bsdf_out1_sss_strength;
float node0_bsdf_out3_specular;
float node0_bsdf_out2_metallic;
float node0_bsdf_out4_roughness;
float node0_bsdf_out5_clearcoat;
float node0_bsdf_out6_clearcoat_gloss;
float node0_bsdf_out7_anisotropy;
float node0_bsdf_out8_transmission;
float node0_bsdf_out9_ior;
node_bsdf_principled(node0_in0_basecolor, node0_in1_subsurface,
node0_in3_subsurfacecolor, node0_in4_metallic, node0_in5_specular,
node0_in7_roughness, node0_in12_clearcoat, node0_in13_clearcoatroughness,
node0_in8_anisotropic, node0_in15_transmission, node0_in14_ior,
node0_bsdf_out0_albedo, node0_bsdf_out1_sss_strength, node0_bsdf_out2_metallic,
node0_bsdf_out3_specular, node0_bsdf_out4_roughness, node0_bsdf_out5_clearcoat,
node0_bsdf_out6_clearcoat_gloss, node0_bsdf_out7_anisotropy,
node0_bsdf_out8_transmission, node0_bsdf_out9_ior);
ALBEDO = node0_bsdf_out0_albedo;
SSS_STRENGTH = node0_bsdf_out1_sss_strength;
SPECULAR = node0_bsdf_out3_specular;
METALLIC = node0_bsdf_out2_metallic;
ROUGHNESS = node0_bsdf_out4_roughness;
CLEARCOAT = node0_bsdf_out5_clearcoat;
CLEARCOAT_GLOSS = node0_bsdf_out6_clearcoat_gloss;
NORMAL = node0_in19_normal;
// uncomment it when you need it
// TRANSMISSION = vec3(1.0, 1.0, 1.0) * node0_bsdf_out8_transmission;
// uncomment it when you are modifing TANGENT
// TANGENT = normalize(cross(cross(node0_in21_tangent, NORMAL), NORMAL));
// BINORMAL = cross(TANGENT, NORMAL);
// uncomment it when you have tangent(UV) set
// ANISOTROPY = node0_bsdf_out7_anisotropy;
}
"
[sub_resource id=2 type="ShaderMaterial"]
resource_name = ""
shader = SubResource(1)
[sub_resource id=3 type="ArrayMesh"]
resource_name = "Cube"
surfaces/0 = {
"material":SubResource(2),
"primitive":4,
"arrays":[
Vector3Array(1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, -1.0, 1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0, -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0, -1.0, -1.0),
Vector3Array(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0),
FloatArray(-1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, -1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0),
null, ; no Vertex Colors,
Vector2Array(0.625, 0.5, 0.875, 0.5, 0.875, 0.25, 0.625, 0.25, 0.375, 0.25, 0.625, 0.25, 0.625, 0.0, 0.375, 0.0, 0.375, 1.0, 0.625, 1.0, 0.625, 0.75, 0.375, 0.75, 0.125, 0.5, 0.375, 0.5, 0.375, 0.25, 0.125, 0.25, 0.375, 0.5, 0.625, 0.5, 0.625, 0.25, 0.375, 0.25, 0.375, 0.75, 0.625, 0.75, 0.625, 0.5, 0.375, 0.5),
null, ; No UV2,
null, ; No Bones,
null, ; No Weights,
IntArray(0, 2, 1, 0, 3, 2, 4, 6, 5, 4, 7, 6, 8, 10, 9, 8, 11, 10, 12, 14, 13, 12, 15, 14, 16, 18, 17, 16, 19, 18, 20, 22, 21, 20, 23, 22)
],
"morph_arrays":[]
}
[node type="Spatial" name="Scene"]
[node name="Cube" type="MeshInstance" parent="."]
mesh = SubResource(3)
visible = true
transform = Transform(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
[node name="Light" type="OmniLight" parent="."]
light_specular = 1.0
light_color = Color(1.0, 1.0, 1.0, 1.0)
shadow_color = Color(0.0, 0.0, 0.0, 1.0)
light_energy = 10.0
omni_range = 40.0
transform = Transform(-0.290865, -0.771101, 0.566393, -0.0551891, 0.604525, 0.794672, -0.955171, 0.199883, -0.218391, 4.07625, 5.90386, -1.00545)
light_negative = false
shadow_enabled = true
[node name="Camera" type="Camera" parent="."]
far = 100.0
near = 0.1
size = 7.31429
projection = 0
fov = 39.5978
transform = Transform(0.685921, -0.324014, 0.651558, 0.0, 0.895396, 0.445271, -0.727676, -0.305421, 0.61417, 7.35889, 4.95831, 6.92579)
extends Node
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
shader_type spatial;
render_mode skip_vertex_transform;
void vertex() {
// Disable the built-in modelview transform and do it manually.
VERTEX = (MODELVIEW_MATRIX * vec4(VERTEX, 1.0)).xyz;
NORMAL = normalize((MODELVIEW_MATRIX * vec4(NORMAL, 0.0)).xyz);
}
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
sun_color = Color( 0.972549, 0.905882, 0.611765, 1 )
sun_energy = 2.0
[resource]
background_mode = 2
background_sky = SubResource( 1 )
background_energy = 4.0
fog_enabled = true
[gd_scene load_steps=2 format=2]
[ext_resource path="res://test.gd" type="Script" id=1]
[node name="Root" type="Node"]
script = ExtResource( 1 )
[node name="Spatial" type="Spatial" parent="."]
visible = false
[node name="Control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
__meta__ = {
"_edit_lock_": true,
"_edit_use_anchors_": false
}
[node name="Node2D" type="Node2D" parent="."]
__meta__ = {
"_edit_group_": true
}
[node name="Sprite" type="Sprite" parent="Node2D"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment