Weiter am Editor gearbeitet, unter anderem LOD System, Items, Trees, Modelle
79
blight-assets/src/main/resources/MatDefs/Fern.j3md
Normal file
@@ -0,0 +1,79 @@
|
||||
MaterialDef Fern {
|
||||
|
||||
MaterialParameters {
|
||||
Color Diffuse (Color) : 0.18 0.60 0.10 1.0
|
||||
Float WindStrength : 0.15
|
||||
Float WindSpeed : 0.6
|
||||
Texture2D DiffuseMap
|
||||
Boolean HasDiffuseMap : false
|
||||
Texture2D NormalMap -LINEAR
|
||||
Boolean HasNormalMap : false
|
||||
|
||||
Int BoundDrawBuffer
|
||||
Int FilterMode
|
||||
Boolean HardwareShadows
|
||||
Texture2D ShadowMap0
|
||||
Texture2D ShadowMap1
|
||||
Texture2D ShadowMap2
|
||||
Texture2D ShadowMap3
|
||||
Float ShadowIntensity : 1.0
|
||||
Vector4 Splits
|
||||
Vector2 FadeInfo
|
||||
Matrix4 LightViewProjectionMatrix0
|
||||
Matrix4 LightViewProjectionMatrix1
|
||||
Matrix4 LightViewProjectionMatrix2
|
||||
Matrix4 LightViewProjectionMatrix3
|
||||
Vector3 LightDir
|
||||
Float PCFEdge
|
||||
Float ShadowMapSize
|
||||
Boolean BackfaceShadows : false
|
||||
}
|
||||
|
||||
Technique {
|
||||
VertexShader GLSL150 : Shaders/Fern.vert
|
||||
FragmentShader GLSL150 : Shaders/Fern.frag
|
||||
|
||||
WorldParameters {
|
||||
WorldViewProjectionMatrix
|
||||
WorldMatrix
|
||||
Time
|
||||
}
|
||||
|
||||
RenderState {
|
||||
FaceCull Off
|
||||
}
|
||||
}
|
||||
|
||||
Technique PreShadow {
|
||||
VertexShader GLSL150 : Shaders/LeafPreShadow.vert
|
||||
FragmentShader GLSL150 : Shaders/LeafPreShadow.frag
|
||||
|
||||
WorldParameters {
|
||||
WorldViewProjectionMatrix
|
||||
}
|
||||
|
||||
ForcedRenderState {
|
||||
FaceCull Off
|
||||
DepthTest On
|
||||
DepthWrite On
|
||||
PolyOffset 5 3
|
||||
ColorWrite Off
|
||||
}
|
||||
}
|
||||
|
||||
Technique PostShadow {
|
||||
VertexShader GLSL150 : Shaders/LeafPostShadow.vert
|
||||
FragmentShader GLSL150 : Shaders/LeafPostShadow.frag
|
||||
|
||||
WorldParameters {
|
||||
WorldViewProjectionMatrix
|
||||
WorldMatrix
|
||||
}
|
||||
|
||||
ForcedRenderState {
|
||||
Blend Modulate
|
||||
FaceCull Off
|
||||
DepthWrite Off
|
||||
}
|
||||
}
|
||||
}
|
||||
15
blight-assets/src/main/resources/Models/FernPlantV2.j3o.meta
Normal file
@@ -0,0 +1,15 @@
|
||||
#Mon Jun 08 11:09:04 CEST 2026
|
||||
castShadow=true
|
||||
category=
|
||||
name=FernPlantV2
|
||||
pivotOffsetY=0.0
|
||||
placementOffsetY=0.0
|
||||
randomScaleMax=1.0
|
||||
randomScaleMin=1.0
|
||||
receiveShadow=true
|
||||
scaleX=0.002
|
||||
scaleY=0.002
|
||||
scaleZ=0.002
|
||||
solid=false
|
||||
tags=
|
||||
uniformScale=true
|
||||
@@ -0,0 +1,20 @@
|
||||
#Mon Jun 08 22:18:33 CEST 2026
|
||||
castShadow=true
|
||||
category=
|
||||
cullDistance=120.0
|
||||
lod1Distance=30.0
|
||||
lod1Path=
|
||||
lod2Distance=80.0
|
||||
lod2Path=
|
||||
name=kaktusfeige
|
||||
pivotOffsetY=0.0
|
||||
placementOffsetY=0.0
|
||||
randomScaleMax=1.0
|
||||
randomScaleMin=1.0
|
||||
receiveShadow=true
|
||||
scaleX=2.5
|
||||
scaleY=2.5
|
||||
scaleZ=2.5
|
||||
solid=true
|
||||
tags=
|
||||
uniformScale=true
|
||||
42
blight-assets/src/main/resources/Shaders/Fern.frag
Normal file
@@ -0,0 +1,42 @@
|
||||
#import "Common/ShaderLib/GLSLCompat.glsllib"
|
||||
|
||||
uniform vec4 m_Diffuse;
|
||||
uniform sampler2D m_DiffuseMap;
|
||||
uniform bool m_HasDiffuseMap;
|
||||
uniform sampler2D m_NormalMap;
|
||||
uniform bool m_HasNormalMap;
|
||||
|
||||
in vec2 texCoord;
|
||||
in vec3 vNormal;
|
||||
in vec3 vTangent;
|
||||
in float vHandedness;
|
||||
|
||||
void main() {
|
||||
vec3 baseColor;
|
||||
if (m_HasDiffuseMap) {
|
||||
vec4 tex = texture2D(m_DiffuseMap, texCoord);
|
||||
if (tex.a < 0.5) discard;
|
||||
baseColor = tex.rgb * m_Diffuse.rgb;
|
||||
} else {
|
||||
vec2 uv = texCoord * 2.0 - 1.0;
|
||||
if (dot(uv, uv) > 0.95) discard;
|
||||
baseColor = m_Diffuse.rgb;
|
||||
}
|
||||
|
||||
vec3 N = normalize(vNormal);
|
||||
if (m_HasNormalMap) {
|
||||
vec3 T = normalize(vTangent);
|
||||
vec3 B = normalize(cross(N, T) * vHandedness);
|
||||
mat3 TBN = mat3(T, B, N);
|
||||
vec3 nm = texture2D(m_NormalMap, texCoord).rgb * 2.0 - 1.0;
|
||||
N = normalize(TBN * nm);
|
||||
}
|
||||
|
||||
vec3 sun = normalize(vec3(0.4, 1.0, 0.3));
|
||||
float diff = max(0.0, dot(N, sun));
|
||||
// two-sided: underside receives half brightness
|
||||
diff = max(diff, max(0.0, dot(-N, sun)) * 0.5);
|
||||
float lit = 0.45 + diff * 0.55;
|
||||
|
||||
gl_FragColor = vec4(baseColor * lit, 1.0);
|
||||
}
|
||||
34
blight-assets/src/main/resources/Shaders/Fern.vert
Normal file
@@ -0,0 +1,34 @@
|
||||
#import "Common/ShaderLib/GLSLCompat.glsllib"
|
||||
|
||||
uniform mat4 g_WorldViewProjectionMatrix;
|
||||
uniform mat4 g_WorldMatrix;
|
||||
uniform float g_Time;
|
||||
uniform float m_WindStrength;
|
||||
uniform float m_WindSpeed;
|
||||
|
||||
in vec3 inPosition;
|
||||
in vec3 inNormal;
|
||||
in vec2 inTexCoord;
|
||||
in vec4 inColor; // R = wind weight (0=base, 1=tip)
|
||||
in vec4 inTangent; // xyz=tangent, w=handedness
|
||||
|
||||
out vec2 texCoord;
|
||||
out vec3 vNormal;
|
||||
out vec3 vTangent;
|
||||
out float vHandedness;
|
||||
|
||||
void main() {
|
||||
float windW = inColor.r;
|
||||
float t = g_Time * m_WindSpeed;
|
||||
vec4 wp = g_WorldMatrix * vec4(inPosition, 1.0);
|
||||
float phase = wp.x * 0.08 + wp.z * 0.06;
|
||||
float swayX = sin(t + phase) * windW * m_WindStrength;
|
||||
float swayZ = cos(t*0.73 + phase) * windW * m_WindStrength * 0.55;
|
||||
vec3 anim = inPosition + vec3(swayX, 0.0, swayZ);
|
||||
|
||||
gl_Position = g_WorldViewProjectionMatrix * vec4(anim, 1.0);
|
||||
texCoord = inTexCoord;
|
||||
vNormal = normalize((g_WorldMatrix * vec4(inNormal, 0.0)).xyz);
|
||||
vTangent = normalize((g_WorldMatrix * vec4(inTangent.xyz, 0.0)).xyz);
|
||||
vHandedness = inTangent.w;
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.0 MiB |
BIN
blight-assets/src/main/resources/Textures/fern/Fern02_Normal.tga
Normal file
|
After Width: | Height: | Size: 3.0 MiB |
|
After Width: | Height: | Size: 4.0 MiB |
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 506 KiB |
|
After Width: | Height: | Size: 695 KiB |
|
After Width: | Height: | Size: 535 KiB |
|
After Width: | Height: | Size: 277 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 78 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 178 KiB |
BIN
blight-assets/src/main/resources/animations/pickup.glb
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"itemId": "neues_item_1780949443027",
|
||||
"category": "CONSUMABLES",
|
||||
"name": {
|
||||
"id": "bloddagave.name"
|
||||
},
|
||||
"description": {
|
||||
"id": "bloddagave.description"
|
||||
},
|
||||
"worthGold": 50
|
||||
}
|
||||