Skip to content

Commit

Permalink
Use int type for enum uniforms (#4171)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Jan 21, 2020
1 parent 13c90fd commit c64ad8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core/src/shaderlib/project/project.glsl.js
Expand Up @@ -22,18 +22,18 @@ import {COORDINATE_SYSTEM, PROJECTION_MODE} from '../../lib/constants';

// We are generating these from the js code in constants.js
const COORDINATE_SYSTEM_GLSL_CONSTANTS = Object.keys(COORDINATE_SYSTEM)
.map(key => `const float COORDINATE_SYSTEM_${key} = ${COORDINATE_SYSTEM[key]}.;`)
.map(key => `const int COORDINATE_SYSTEM_${key} = ${COORDINATE_SYSTEM[key]};`)
.join('');
const PROJECTION_MODE_GLSL_CONSTANTS = Object.keys(PROJECTION_MODE)
.map(key => `const float PROJECTION_MODE_${key} = ${PROJECTION_MODE[key]}.;`)
.map(key => `const int PROJECTION_MODE_${key} = ${PROJECTION_MODE[key]};`)
.join('');

export default `\
${COORDINATE_SYSTEM_GLSL_CONSTANTS}
${PROJECTION_MODE_GLSL_CONSTANTS}
uniform float project_uCoordinateSystem;
uniform float project_uProjectionMode;
uniform int project_uCoordinateSystem;
uniform int project_uProjectionMode;
uniform float project_uScale;
uniform bool project_uWrapLongitude;
uniform float project_uAntimeridian;
Expand Down

0 comments on commit c64ad8c

Please sign in to comment.