1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-10 19:32:10 +00:00

Volumetric effects

This commit is contained in:
Gefüllte Taubenbrust 2024-07-05 12:15:22 +02:00
parent cd6e304cfa
commit 22ba7449f2
15 changed files with 468 additions and 23 deletions

View file

@ -0,0 +1,15 @@
// Pseudorandom number generator
float rand(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
}
// More random pseudorandom number generator;
float noise(vec2 p){
vec2 p2 = p + vec2(rand(p), rand(p.yx));
return rand(p2);
}
void main(void)
{
gl_FragColor = vec4(vec3(noise(gl_FragCoord.xy)), 1.);
}

View file

@ -0,0 +1,4 @@
void main(void)
{
gl_Position = inVertexPosition;
}