mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Volumetric effects
This commit is contained in:
parent
cd6e304cfa
commit
22ba7449f2
15 changed files with 468 additions and 23 deletions
17
client/shaders/volumetric_clouds/opengl_vertex.glsl
Normal file
17
client/shaders/volumetric_clouds/opengl_vertex.glsl
Normal file
|
@ -0,0 +1,17 @@
|
|||
uniform mat4 mCameraProjInv;
|
||||
uniform mat4 mCameraView;
|
||||
uniform vec3 eyePosition;
|
||||
|
||||
varying vec3 relativePosition;
|
||||
varying vec3 viewDirection;
|
||||
|
||||
varying vec2 screenspaceCoordinate;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
screenspaceCoordinate = inVertexPosition.xy;
|
||||
vec4 p = mCameraProjInv * inVertexPosition;
|
||||
viewDirection = p.xyz / p.w;
|
||||
relativePosition = (p.xyz / p.w) * mat3(mCameraView);
|
||||
gl_Position = inVertexPosition;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue