chore: reformat

This commit is contained in:
stitchy 2024-12-18 08:32:49 +00:00
parent 5b6d03e1c8
commit 39f9437838
Signed by: stitchy
SSH key fingerprint: SHA256:yz2SoxdnY67tfY5Jzb0f2v8f5W3o/IF359kbcquWip8
2 changed files with 28 additions and 36 deletions

View file

@ -25,16 +25,13 @@ const vec3 color2 = vec3(0.827, 0.945, 0.875);
// returns the distance from the ray to this sphere in the scene
float sphere_render(vec3 ray_pos, float radius, vec3 sphere_pos) {
return distance(ray_pos, sphere_pos) - radius;
}
float remap11(float val) {
return ((val - .5) * 2.);
}
void main() {
// Set up camera and sphere object
@ -44,7 +41,6 @@ void main() {
const float rad = 1.;
for (int i = 0; i < MAX_ITERATIONS; i++) {
float distance = sphere_render(ray_pos, rad, sphere_pos);
// Check If within tolerances
@ -56,7 +52,6 @@ void main() {
color = vec4(mix(color1, color2, float(i) / float(MAX_ITERATIONS)), 1.);
}
// Image stuff for later
/*
if ((texture_coordinates.x + texture_coordinates.y) > 1.) {

View file

@ -4,10 +4,7 @@ precision highp float;
in vec2 vertex_position;
out vec2 texture_coordinates;
void main() {
gl_Position = vec4(vertex_position, 0.5, 1.0);
texture_coordinates = vec2((vertex_position + vec2(1.0)) / 2.0);
}