~vladh/peony

peony/src_shaders/simple.frag -rw-r--r-- 251 bytes
7fc9922bVlad-Stefan Harbuz changes shaders namespace into class a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*
  Peony Game Engine
  Copyright (C) 2020 Vlad-Stefan Harbuz <vlad@vladh.net>
  All rights reserved.
*/

out vec4 frag_color;

in BLOCK {
  vec3 normal;
} fs_in;

void main() {
  vec3 N = normalize(fs_in.normal);
  frag_color = vec4(abs(N), 1.0);
}