mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
work
This commit is contained in:
17
shaders/mat_stars.frag
Normal file
17
shaders/mat_stars.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
#version 330
|
||||
|
||||
#include <common>
|
||||
|
||||
in vec3 f_normal;
|
||||
|
||||
void main()
|
||||
{
|
||||
float x = (gl_PointCoord.x - 0.5f) * 2.0f;
|
||||
float y = (gl_PointCoord.y - 0.5f) * 2.0f;
|
||||
float dist2 = abs(x * x + y * y);
|
||||
if (dist2 > 0.5f * 0.5f)
|
||||
discard;
|
||||
|
||||
// color data is shared with normals, ugh
|
||||
gl_FragColor = vec4(f_normal, 1.0f);
|
||||
}
|
||||
Reference in New Issue
Block a user