Skip to content

Commit

Permalink
Small fixes throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Jul 31, 2017
1 parent 1e0ecef commit 40a1c04
Show file tree
Hide file tree
Showing 32 changed files with 173 additions and 325 deletions.
10 changes: 5 additions & 5 deletions Source/Renderer/AutomaticUniforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -1439,23 +1439,23 @@ define([
/**
* An automatic GLSL uniform containing the BRDF look up texture used for image-based lighting computations.
*
* @alias czm_brdfLUT
* @alias czm_brdfLut
* @glslUniform
*
* @example
* // GLSL declaration
* uniform sampler2D czm_brdfLUT;
* uniform sampler2D czm_brdfLut;
*
* // Example: For a given roughness and NdotV value, find the material's BRDF information in the red and green channels
* float roughness = 0.5;
* float NdotV = dot(normal, view);
* vec2 brdfLUT = texture2D(czm_brdfLUT, vec2(NdotV, 1.0 - roughness)).rg;
* vec2 brdfLut = texture2D(czm_brdfLut, vec2(NdotV, 1.0 - roughness)).rg;
*/
czm_brdfLUT : new AutomaticUniform({
czm_brdfLut : new AutomaticUniform({
size : 1,
datatype : WebGLConstants.SAMPLER_2D,
getValue : function(uniformState) {
return uniformState.brdfLUT;
return uniformState.brdfLut;
}
}),

Expand Down
8 changes: 4 additions & 4 deletions Source/Renderer/UniformState.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ define([
this._orthographicIn3D = false;
this._backgroundColor = new Color();

this._brdfLUT = new Sampler();
this._brdfLut = new Sampler();
this._environmentMap = new Sampler();

this._fogDensity = undefined;
Expand Down Expand Up @@ -806,9 +806,9 @@ define([
* @memberof UniformState.prototype
* @type {Sampler}
*/
brdfLUT : {
brdfLut : {
get : function() {
return this._brdfLUT;
return this._brdfLut;
}
},

Expand Down Expand Up @@ -1002,7 +1002,7 @@ define([

setSunAndMoonDirections(this, frameState);

this._brdfLUT = frameState.brdfLUT.colorTexture;
this._brdfLut = frameState.brdfLutGenerator.colorTexture;

this._environmentMap = frameState.environmentMap;

Expand Down
1 change: 0 additions & 1 deletion Source/Scene/BrdfLutGenerator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'../Core/BoundingRectangle',
'../Core/Color',
Expand Down
1 change: 0 additions & 1 deletion Source/Scene/ClassificationPrimitive.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*global define*/
define([
'../Core/ColorGeometryInstanceAttribute',
'../Core/defaultValue',
Expand Down
2 changes: 1 addition & 1 deletion Source/Scene/FrameState.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define([
* The BRDF look up texture generator used for image-based lighting for PBR models
* @type {BrdfLutGenerator}
*/
this.brdfLUT = undefined;
this.brdfLutGenerator = undefined;

/**
* The environment map used for image-based lighting for PBR models
Expand Down
Loading

0 comments on commit 40a1c04

Please sign in to comment.