хе-хе
This commit is contained in:
parent
c53c3328dd
commit
71cb47a22d
@ -1,7 +1,7 @@
|
||||
#ifndef PROTOTYPE1_SRC_L2_MARIE_GRAPHICS_GEOM_H
|
||||
#define PROTOTYPE1_SRC_L2_MARIE_GRAPHICS_GEOM_H
|
||||
|
||||
#include "../../../gen/geom.h"
|
||||
#include "../../../gen/l2/geom.h"
|
||||
#include "math.h"
|
||||
|
||||
mat4 marie_translation_mat4(vec3 vec) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "../../margaret/margaret.h"
|
||||
#include "../../../../gen/geom.h"
|
||||
#include "../../../../gen/l2/geom.h"
|
||||
#include <math.h>
|
||||
#include "../../../l1/system/fileio.h"
|
||||
#include <time.h>
|
||||
|
||||
@ -11,11 +11,5 @@ function compile(){
|
||||
|
||||
compile 0
|
||||
compile 1
|
||||
compile 0b
|
||||
|
||||
#cd ../test_textures
|
||||
#
|
||||
#function png_to_r8g8b8a8 {
|
||||
# python bitmap_convert.py to_bmp "$1.png" "$1.r8g8b8"
|
||||
#}
|
||||
#
|
||||
#png_to_r8g8b8a8 log_10_2_6
|
||||
|
||||
@ -39,12 +39,12 @@ void main(){
|
||||
vec3 specular_illumination = vec3(0);
|
||||
for (int i = 0; i < point_light_count; i++) {
|
||||
Pipeline0PointLight lamp = point_light_arr[i];
|
||||
vec3 to_light = -fsin_pos + lamp.pos;
|
||||
vec3 to_light = -pos + lamp.pos;
|
||||
float dist = length(to_light);
|
||||
vec3 U = to_light / dist;
|
||||
diffuse_illumination += get_intensity(dist) * max(0.02, dot(U, norm)) * lamp.color;
|
||||
vec3 A = reflect(-U, norm);
|
||||
vec3 B = normalize(-fsin_pos+camera_pos);
|
||||
vec3 B = normalize(-pos+camera_pos);
|
||||
specular_illumination += get_intensity(dist) * pow(max(0, dot(A, B)), 256) * lamp.color;
|
||||
}
|
||||
for (int i = 0; i < spotlight_count; i++) {
|
||||
|
||||
0
src/l2/tests/r1/r1.c
Normal file
0
src/l2/tests/r1/r1.c
Normal file
12
src/l2/tests/r1/shader_compile.sh
Normal file
12
src/l2/tests/r1/shader_compile.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set +x
|
||||
cd test_shaders
|
||||
|
||||
function compile(){
|
||||
mkdir -p "spv/$1"
|
||||
glslc -o "spv/$1/vert.spv" "glsl/$1/$1.vert"
|
||||
glslc -o "spv/$1/frag.spv" "glsl/$1/$1.frag"
|
||||
}
|
||||
|
||||
compile 0
|
||||
1
src/l2/tests/r1/shaders/glsl/0/0.frag
Normal file
1
src/l2/tests/r1/shaders/glsl/0/0.frag
Normal file
@ -0,0 +1 @@
|
||||
#version 450
|
||||
1
src/l2/tests/r1/shaders/glsl/0/0.vert
Normal file
1
src/l2/tests/r1/shaders/glsl/0/0.vert
Normal file
@ -0,0 +1 @@
|
||||
#version 450
|
||||
Loading…
x
Reference in New Issue
Block a user