This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
precision highp int; | |
precision highp sampler2D; | |
#include <pathtracing_uniforms_and_defines> | |
uniform int uMaterialType; | |
uniform vec3 uMaterialColor; | |
#define N_LIGHTS 3.0 | |
#define N_SPHERES 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scene/demo-specific variables go here | |
let material_TypeObject, material_ColorObject; | |
let material_TypeController, material_ColorController; | |
let changeMaterialType = false; | |
let changeMaterialColor = false; | |
let matType = 0; | |
let matColor; | |
// called automatically from within initTHREEjs() function (located in InitCommon.js file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js PathTracing Renderer - Monte Carlo Rendering</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1"> | |
<link href="css/default.css" rel="stylesheet"> | |
<script type="importmap"> | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
precision highp int; | |
precision highp sampler2D; | |
#include <pathtracing_uniforms_and_defines> | |
uniform sampler2D tShape_DataTexture; | |
uniform sampler2D tAABB_DataTexture; | |
uniform vec3 uOutlineColor; | |
uniform float uOutlineIntensity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scene/demo-specific variables go here | |
let boxGeometry, boxMaterial; | |
let boxMeshes = []; | |
let boxGeometries = []; | |
let totalNumberOfShapes = 0; | |
let shape = new THREE.Object3D(); | |
let invMatrix = new THREE.Matrix4(); | |
let el; // elements of the invMatrix | |
let shapeBoundingBox_minCorner = new THREE.Vector3(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>three.js PathTracing Renderer - CSG Model Rendering</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1"> | |
<link href="css/default.css" rel="stylesheet"> | |
<script type="importmap"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
precision highp float; | |
precision highp int; | |
precision highp sampler2D; | |
#include <pathtracing_uniforms_and_defines> | |
uniform sampler2D tTriangleTexture; | |
uniform sampler2D tAABBTexture; | |
uniform sampler2D tAlbedoTextures[8]; // 8 = max number of diffuse albedo textures per model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scene/demo-specific variables go here | |
let modelMesh; | |
let modelScale = 1.0; | |
let modelPositionOffset = new THREE.Vector3(); | |
let albedoTexture; | |
let total_number_of_triangles = 0; | |
let triangle_array; | |
let triangleMaterialMarkers = []; | |
let pathTracingMaterialList = []; | |
let uniqueMaterialTextures = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let buildnodes = []; | |
let leftWorklist = []; | |
let rightWorklist = []; | |
let nodesUsed = 1; | |
let aabb_array_copy; | |
let k, value, side0, side1, side2; | |
let bestSplit, goodSplit, okaySplit; | |
let bestAxis, goodAxis, okayAxis; | |
let currentMinCorner = new THREE.Vector3(); | |
let currentMaxCorner = new THREE.Vector3(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scene/demo-specific variables go here | |
let sunAngle = 0; | |
let sunDirection = new THREE.Vector3(); | |
let tallBoxGeometry, tallBoxMaterial, tallBoxMesh; | |
let shortBoxGeometry, shortBoxMaterial, shortBoxMesh; | |
let PerlinNoiseTexture; | |
// called automatically from within initTHREEjs() function (located in InitCommon.js file) | |
function initSceneData() | |
{ |
NewerOlder