Fehler im LOD System behoben
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 904 B After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 998 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 990 B |
@@ -10,6 +10,30 @@ MaterialDef Tree {
|
||||
Vector3 LightDir : 0.6 -0.8 0.4
|
||||
Vector3 SunColor : 0.68 0.65 0.60
|
||||
Vector3 AmbientColor : 0.08 0.10 0.16
|
||||
|
||||
// Vom Shadow-Renderer befüllt (PostShadow-Pass)
|
||||
Int BoundDrawBuffer
|
||||
Int FilterMode
|
||||
Boolean HardwareShadows
|
||||
Texture2D ShadowMap0
|
||||
Texture2D ShadowMap1
|
||||
Texture2D ShadowMap2
|
||||
Texture2D ShadowMap3
|
||||
Texture2D ShadowMap4
|
||||
Texture2D ShadowMap5
|
||||
Float ShadowIntensity : 1.0
|
||||
Vector4 Splits
|
||||
Vector2 FadeInfo
|
||||
Matrix4 LightViewProjectionMatrix0
|
||||
Matrix4 LightViewProjectionMatrix1
|
||||
Matrix4 LightViewProjectionMatrix2
|
||||
Matrix4 LightViewProjectionMatrix3
|
||||
Matrix4 LightViewProjectionMatrix4
|
||||
Matrix4 LightViewProjectionMatrix5
|
||||
Vector3 LightPos
|
||||
Float PCFEdge
|
||||
Float ShadowMapSize
|
||||
Boolean BackfaceShadows : false
|
||||
}
|
||||
|
||||
Technique {
|
||||
@@ -25,4 +49,19 @@ MaterialDef Tree {
|
||||
Defines {
|
||||
}
|
||||
}
|
||||
|
||||
Technique PostShadow {
|
||||
VertexShader GLSL150 : Shaders/TreePostShadow.vert
|
||||
FragmentShader GLSL150 : Shaders/TreePostShadow.frag
|
||||
|
||||
WorldParameters {
|
||||
WorldViewProjectionMatrix
|
||||
WorldMatrix
|
||||
}
|
||||
|
||||
ForcedRenderState {
|
||||
Blend Modulate
|
||||
DepthWrite Off
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Mon Jul 20 11:46:10 CEST 2026
|
||||
#Mon Jul 20 20:34:07 CEST 2026
|
||||
attachedEmitters.count=0
|
||||
attachedLights.count=0
|
||||
castShadow=true
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Mon Jul 20 13:09:03 CEST 2026
|
||||
#Mon Jul 20 20:34:14 CEST 2026
|
||||
attachedEmitters.count=0
|
||||
attachedLights.count=0
|
||||
castShadow=true
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#Mon Jul 20 13:25:15 CEST 2026
|
||||
#Mon Jul 20 20:34:23 CEST 2026
|
||||
attachedEmitters.count=0
|
||||
attachedLights.count=0
|
||||
castShadow=true
|
||||
|
||||
13
blight-assets/src/main/resources/Shaders/TreePostShadow.frag
Normal file
13
blight-assets/src/main/resources/Shaders/TreePostShadow.frag
Normal file
@@ -0,0 +1,13 @@
|
||||
#import "Common/ShaderLib/GLSLCompat.glsllib"
|
||||
|
||||
uniform sampler2D m_ShadowMap0;
|
||||
uniform float m_ShadowIntensity;
|
||||
|
||||
in vec4 shadowCoord;
|
||||
|
||||
void main() {
|
||||
vec3 coord = shadowCoord.xyz / shadowCoord.w;
|
||||
float mapDepth = texture2D(m_ShadowMap0, coord.xy).r;
|
||||
float lit = (coord.z > mapDepth + 0.001) ? (1.0 - m_ShadowIntensity) : 1.0;
|
||||
gl_FragColor = vec4(lit, lit, lit, 1.0);
|
||||
}
|
||||
15
blight-assets/src/main/resources/Shaders/TreePostShadow.vert
Normal file
15
blight-assets/src/main/resources/Shaders/TreePostShadow.vert
Normal file
@@ -0,0 +1,15 @@
|
||||
#import "Common/ShaderLib/GLSLCompat.glsllib"
|
||||
|
||||
uniform mat4 g_WorldViewProjectionMatrix;
|
||||
uniform mat4 g_WorldMatrix;
|
||||
uniform mat4 m_LightViewProjectionMatrix0;
|
||||
|
||||
in vec3 inPosition;
|
||||
|
||||
out vec4 shadowCoord;
|
||||
|
||||
void main() {
|
||||
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
|
||||
vec4 worldPos = g_WorldMatrix * vec4(inPosition, 1.0);
|
||||
shadowCoord = m_LightViewProjectionMatrix0 * worldPos;
|
||||
}
|
||||
Reference in New Issue
Block a user