mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-26 18:21:04 +00:00
Shadow mapping render pass (#11244)
Co-authored-by: x2048 <codeforsmile@gmail.com>
This commit is contained in:
parent
46f42e15c4
commit
c47313db65
35 changed files with 2624 additions and 38 deletions
13
client/shaders/shadow_shaders/pass1_fragment.glsl
Normal file
13
client/shaders/shadow_shaders/pass1_fragment.glsl
Normal file
|
@ -0,0 +1,13 @@
|
|||
uniform sampler2D ColorMapSampler;
|
||||
varying vec4 tPos;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 col = texture2D(ColorMapSampler, gl_TexCoord[0].st);
|
||||
|
||||
if (col.a < 0.70)
|
||||
discard;
|
||||
|
||||
float depth = 0.5 + tPos.z * 0.5;
|
||||
gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue