Skip to content

Commit

Permalink
Crystal and scarcity adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
HexapodPhilosopher committed Dec 13, 2024
1 parent 48348f1 commit 39184ec
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
7 changes: 4 additions & 3 deletions assets/models/PhosphateChunkApatiteLarge1.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
resource_local_to_scene = true
render_priority = 18
shader = ExtResource("1_0qsxg")
shader_parameter/albedo = Color(0.09, 0.347833, 1, 1)
shader_parameter/albedo = Color(0.262745, 0.309804, 1, 1)
shader_parameter/useNormal = false
shader_parameter/roughness = 0.261
shader_parameter/roughnessTextureChannel = Vector4(1, 0, 0, 0)
shader_parameter/specular = 0.65
shader_parameter/metallic = 0.15
shader_parameter/emission = Color(0.0105999, 0.004, 0.4, 0.956863)
shader_parameter/emissionEnergy = 0.0
shader_parameter/emission = Color(0.0195242, 0.00734134, 0.53186, 0.956863)
shader_parameter/emissionEnergy = 0.25
shader_parameter/dissolveValue = 0.0
shader_parameter/dissolveScale = 1.8
shader_parameter/outlineWidth = 0.02
Expand Down
1 change: 1 addition & 0 deletions assets/models/PhosphateChunkApatiteSmall1.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ shader = ExtResource("1_g5rlt")
shader_parameter/albedo = Color(9.62615e-07, 0.878612, 0.837866, 0.956863)
shader_parameter/useNormal = false
shader_parameter/roughness = 0.6
shader_parameter/roughnessTextureChannel = Vector4(1, 0, 0, 0)
shader_parameter/specular = 0.7
shader_parameter/metallic = 0.57
shader_parameter/emission = Color(0, 0.419608, 0.498039, 0.972549)
Expand Down
7 changes: 4 additions & 3 deletions assets/models/PhosphateChunkStruviteLarge.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
resource_local_to_scene = true
render_priority = 17
shader = ExtResource("1_mufvt")
shader_parameter/albedo = Color(0.91, 0.85085, 0.5551, 0.956863)
shader_parameter/albedo = Color(0.91, 0.867533, 0.6552, 0.956863)
shader_parameter/useNormal = false
shader_parameter/roughness = 0.365
shader_parameter/roughness = 0.348
shader_parameter/roughnessTextureChannel = Vector4(1, 1, 1, 1)
shader_parameter/specular = 0.75
shader_parameter/metallic = 0.13
shader_parameter/emission = Color(0.352941, 0.321569, 0.219608, 0.823529)
shader_parameter/emissionEnergy = 0.0
shader_parameter/emissionEnergy = 0.25
shader_parameter/dissolveValue = 0.0
shader_parameter/dissolveScale = 1.0
shader_parameter/outlineWidth = 0.01
Expand Down
3 changes: 2 additions & 1 deletion assets/models/PhosphateChunkStruviteSmall1.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
resource_local_to_scene = true
render_priority = 17
shader = ExtResource("1_m8qe5")
shader_parameter/albedo = Color(0.91, 0.879667, 0.8372, 0.682353)
shader_parameter/albedo = Color(0.91, 0.879667, 0.8372, 0.729412)
shader_parameter/useNormal = false
shader_parameter/roughness = 0.75
shader_parameter/roughnessTextureChannel = Vector4(1, 0, 0, 0)
shader_parameter/specular = 0.59
shader_parameter/metallic = 0.59
shader_parameter/emission = Color(0.1, 0.1, 0.1, 1)
Expand Down
1 change: 1 addition & 0 deletions assets/models/PhosphateChunkStruviteSmall2.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ shader = ExtResource("1_6d2xb")
shader_parameter/albedo = Color(0.91, 0.87997, 0.8281, 0.67451)
shader_parameter/useNormal = false
shader_parameter/roughness = 0.75
shader_parameter/roughnessTextureChannel = Vector4(1, 0, 0, 0)
shader_parameter/specular = 0.59
shader_parameter/metallic = 0.59
shader_parameter/emission = Color(0.1, 0.1, 0.1, 1)
Expand Down
4 changes: 2 additions & 2 deletions assets/textures/Crystal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 5 additions & 10 deletions shaders/Crystal.gdshader
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ uniform sampler2D normalTexture;

uniform float roughness : hint_range(0, 1) = 0.6f;
uniform sampler2D roughnessTexture : hint_roughness_r, filter_linear_mipmap, repeat_enable;
//uniform vec4 roughnessTextureChannel = vec4(1.0f, 0.0f, 0.0f, 0.0f);
uniform vec4 roughnessTextureChannel = vec4(1.0f, 0.0f, 0.0f, 0.0f);

uniform float specular : hint_range(0, 1) = 0.7f;
uniform float metallic : hint_range(0, 1) = 0.57f;
Expand All @@ -25,9 +25,7 @@ uniform vec4 growColor : source_color = vec4(0.1f, 0.1f, 0.1f, 1.0f);

void fragment() {
vec4 albedoUV = texture(albedoTexture, UV);
albedoUV.rgb = mix(pow((albedoUV.rgb + vec3(0.055f)) * 0.948f, vec3(2.4f)),
albedoUV.rgb * 0.0774f, lessThan(albedoUV.rgb, vec3(0.04045f)));
vec4 final = mix(albedo, albedoUV, 0.5f);
vec4 final = albedo * albedoUV;

// Handle dissolve animation
vec4 dissolveTex = texture(dissolveTexture, (UV * dissolveScale));
Expand All @@ -44,14 +42,11 @@ void fragment() {
NORMAL_MAP = normalMap.xyz;
}

//float roughnessUV = dot(texture(roughnessTexture, UV), roughnessTextureChannel);
ROUGHNESS = roughness;
float roughnessUV = dot(texture(roughnessTexture, UV), roughnessTextureChannel);
ROUGHNESS = roughnessUV * roughness;

METALLIC = metallic;
SPECULAR = specular;

//float emissionAlpha = 1.0 - (texture(roughnessTexture, UV).a);
//EMISSION = emissionAlpha * dissolveOutline + (emission.rgb * emissionEnergy);
vec4 emissionTex = texture(roughnessTexture, UV);
EMISSION = (dissolveOutline + (emission.rgb * emissionTex.rgb) * emissionEnergy) * emissionTex.a;
EMISSION = ((dissolveOutline + emission.rgb) * roughnessUV * emissionEnergy);
}
12 changes: 6 additions & 6 deletions simulation_parameters/microbe_stage/biomes.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.0001,
"Density": 0.00007,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down Expand Up @@ -637,7 +637,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.00005,
"Density": 0.00004,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down Expand Up @@ -1168,7 +1168,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.000006,
"Density": 0.000005,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down Expand Up @@ -1770,7 +1770,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.00006,
"Density": 0.00003,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down Expand Up @@ -2035,7 +2035,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.0001,
"Density": 0.00006,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down Expand Up @@ -2844,7 +2844,7 @@
"ConvexShapePath": "res://assets/models/SulfurChunkSmall1.shape"
}
],
"Density": 0.00008,
"Density": 0.00006,
"Dissolves": true,
"Radius": 2,
"ChunkScale": 1,
Expand Down

0 comments on commit 39184ec

Please sign in to comment.