Skip to content

Instantly share code, notes, and snippets.

@itch-
itch- / commonFunctions.js
Last active August 3, 2020 21:10
Added multisampling to erichlof's path tracing demos, javascript version
var SCREEN_WIDTH;
var SCREEN_HEIGHT;
var canvas, context;
var container, stats;
var controls;
var pathTracingScene, screenTextureScene, screenOutputScene;
var pathTracingUniforms, screenTextureUniforms, screenOutputUniforms;
var pathTracingDefines;
var pathTracingVertexShader, pathTracingFragmentShader;
var pathTracingGeometry, pathTracingMaterial, pathTracingMesh;
@itch-
itch- / GameEngine_PathTracer_Fragment.glsl
Created July 30, 2020 01:55
Added multisampling to erichlof's path tracing shader
#version 300 es
precision highp float;
precision highp int;
precision highp sampler2D;
#include <pathtracing_uniforms_and_defines>
uniform mat4 uTorusInvMatrix;
uniform mat3 uTorusNormalMatrix;