Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrgags committed Aug 30, 2022
1 parent a85ddc7 commit 0fef944
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/Renderer/ShaderCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ ShaderCache.prototype.getShaderProgram = function (options) {
}

// Since ShaderSource.createCombinedXxxShader() can be expensive, use a
// simpler key for caching.
// simpler key for caching. This way, the function does not have to be called
// for each cache lookup.
const vertexShaderKey = vertexShaderSource.getCacheKey();
const fragmentShaderKey = fragmentShaderSource.getCacheKey();
// Sort the keys in the JSON to ensure a consistent order
Expand All @@ -112,10 +113,10 @@ ShaderCache.prototype.getShaderProgram = function (options) {
const context = this._context;

const vertexShaderText = vertexShaderSource.createCombinedVertexShader(
this._context
context
);
const fragmentShaderText = fragmentShaderSource.createCombinedFragmentShader(
this._context
context
);

const shaderProgram = new ShaderProgram({
Expand Down

0 comments on commit 0fef944

Please sign in to comment.