From 12829892b262a0c7fcccba9198e5b6b31b2a8015 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 9 Jul 2020 13:02:31 +0200 Subject: Cleaning code --- resources/shaders/main.glsl | 93 --------------------------------------------- 1 file changed, 93 deletions(-) delete mode 100644 resources/shaders/main.glsl (limited to 'resources/shaders/main.glsl') diff --git a/resources/shaders/main.glsl b/resources/shaders/main.glsl deleted file mode 100644 index 2888d56..0000000 --- a/resources/shaders/main.glsl +++ /dev/null @@ -1,93 +0,0 @@ -// ----- Vertex Shader ----- -#version 330 core - -layout(location = 0) in vec3 position; -uniform mat4 projection; -uniform mat4 model; - -void main(){ - gl_Position = projection * model * vec4(position,1); -} - -// ----- Fragment Shader ----- - -#version 330 core - -uniform vec2 resolution; -uniform float time; - -out vec3 color; - - -#define MAX_STEPS 100 -#define MAX_DIST 100. -#define SURF_DIST .01 - -float GetDist(vec3 p) { - vec4 s = vec4(0, 1, 6, 1); - - float sphereDist = length(p-s.xyz)-s.w; - float planeDist = p.y; - - float d = min(sphereDist, planeDist); - return d; -} - -float RayMarch(vec3 ro, vec3 rd) { - float dO=0.; - - for(int i=0; iMAX_DIST || dS