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
uniform vec3 ambient; | |
uniform vec3 diffuse; | |
uniform vec3 specular; | |
uniform float shininess; | |
uniform float opacity; | |
uniform bool enableDiffuse; | |
uniform bool enableSpecular; | |
uniform bool enableAO; | |
uniform bool enableReflection; | |
uniform sampler2D tDiffuse; |
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
vec4 inputGamma( const in vec4 input_rgba ) { | |
#ifdef GAMMA_INPUT | |
vec4 output_rgba = input_rgba; | |
output_rgba.xyz * output_rgba.xyz; | |
return output_rgba; | |
#else | |
return input_rgba; | |
#endif |
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
uniform vec3 ambient; | |
uniform vec3 diffuse; | |
uniform vec3 specular; | |
uniform float shininess; | |
uniform float opacity; | |
uniform bool enableDiffuse; | |
uniform bool enableSpecular; | |
uniform bool enableAO; | |
uniform bool enableReflection; | |
uniform sampler2D tDiffuse; |
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
class OStream::PrivateData | |
{ | |
private: | |
char filestreamBuffer[STREAM_BUF_SIZE]; | |
public: | |
PrivateData(const std::string & iFileName) : | |
stream(NULL), fileName(iFileName), startPos(0) | |
{ |
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
Error #1: | |
(unknown): Unable to get value of the property 'toUpperCase': object is null or undefined | |
Location: https://cdn.webglstats.com/stat.js line 8 | |
Browser: IE 9.0 | |
OS: Windows Vista | |
Error #2: | |
(unknown): Error loading script |
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
THREE.Assert = function( mustBeTrue, message ) { | |
if( ! mustBeTrue ) throw new Error( message | "Assertion failure." ); | |
} | |
THREE.Descriptor = function ( elementType, itemSize, isArray, isIndex ) { | |
THREE.Descriptor.AssertElementType( elementType ); | |
this.itemSize = itemSize; | |
this.elementType = elementType; |
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
var gl; | |
function initGL(canvas) { | |
try { | |
gl = WebGLDebugUtils.makeDebugContext( canvas.getContext("webgl"), undefined, | |
function(functionName, arguments) { | |
console.log( " [webgl] " + functionName.toString() + "( ", arguments, " )" ); | |
} ); | |
gl.viewportWidth = canvas.width; | |
gl.viewportHeight = canvas.height; | |
} |
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
/** | |
* @author bhouston / http://clara.io/ | |
* | |
* Scaleable Ambient Obscurance | |
* | |
* based on: | |
* - https://gist.github.com/fisch0920/6770311 | |
* - http://graphics.cs.williams.edu/papers/SAOHPG12/McGuire12SAO-talk.pdf | |
*/ |
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
// source: http://www.mdlhandbook.com/pdf/mdl_handbook.150810.LTR.pdf | |
// Material definition: | |
- Surface properties of front-facing surfaces | |
- Reflection | |
- Transmission | |
- Emission | |
- Surface properties of back-facing surfaces | |
- Reflection |
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
Utilities used by the BxDFs: | |
Fresnel functions: | |
FresnelDielectric( iorI, iorT ) | |
FresnelConductor( iorI, iorT, kappa ) | |
FresnelNoOp() | |
Microfacet distributions: | |
BeckmannDistribution ( uRoughness, vRoughness ); | |
TrowbridgeReitzDistribution( uRoughness, vRoughness ) |
OlderNewer