Skip to content

Instantly share code, notes, and snippets.

View abstractalgo's full-sized avatar

Dragan Okanovic abstractalgo

View GitHub Profile
@abstractalgo
abstractalgo / predavanja
Last active August 29, 2015 14:12
predavanje
--------------------------------------------------------------------------------
-------------- sta je svetlo ---------------------------------------------------
--------------------------------------------------------------------------------
sta je, kako nastaje, kako ga mi primecujemo
EM, fotoni
--------------------------------------------------------------------------------
-------------- rasterizacija vs raytracing -------------------------------------
@abstractalgo
abstractalgo / pathtrace.cpp
Last active March 18, 2017 18:19
pathtrace
#include "stdio.h"
#include <iostream>
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 480
#define STEPS 10
#define BLACK Color(0, 0, 0)
struct Color
fbo, tex, vbo, vao, shader
transform
fbo + shader = pass
vbo + vao = geometry
fbo + tex = rendertarget
shader = material
geoemtry + transform + material = mesh
@abstractalgo
abstractalgo / cool-game-programming-blogs.opml
Created May 1, 2016 17:11 — forked from Reedbeta/cool-game-programming-blogs.opml
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="http://arstechnica.com"/>
<outline type="rss" text="The Tech Report - News" title="The Tech Report - News" xmlUrl="http://techreport.com/news.xml" htmlUrl="http://techreport.com"/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="http://www.roadtovr.com"/>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
#define streq(a, b) (!strcmp((a), (b)))
#ifndef __USE_GNU
#define __USE_GNU
#endif
@abstractalgo
abstractalgo / GLSL-Noise.md
Created June 20, 2016 10:44 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}