Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGLProgram: Do not define USE_UV #25740

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/renderers/webgl/WebGLProgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
parameters.vertexTangents ? '#define USE_TANGENT' : '',
parameters.vertexColors ? '#define USE_COLOR' : '',
parameters.vertexAlphas ? '#define USE_COLOR_ALPHA' : '',
parameters.vertexUvs ? '#define USE_UV' : '',
parameters.vertexUvs2 ? '#define USE_UV2' : '',

parameters.pointsUvs ? '#define USE_POINTS_UV' : '',
Expand Down
8 changes: 2 additions & 6 deletions src/renderers/webgl/WebGLPrograms.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities

const HAS_EXTENSIONS = !! material.extensions;

const HAS_ATTRIBUTE_UV = !! geometry.attributes.uv;
const HAS_ATTRIBUTE_UV2 = !! geometry.attributes.uv2;

const parameters = {
Expand Down Expand Up @@ -266,7 +265,6 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
vertexTangents: HAS_NORMALMAP && !! geometry.attributes.tangent,
vertexColors: material.vertexColors,
vertexAlphas: material.vertexColors === true && !! geometry.attributes.color && geometry.attributes.color.itemSize === 4,
vertexUvs: HAS_ATTRIBUTE_UV,
vertexUvs2: HAS_ATTRIBUTE_UV2,

pointsUvs: object.isPoints === true && !! geometry.attributes.uv && ( HAS_MAP || HAS_ALPHAMAP ),
Expand Down Expand Up @@ -459,12 +457,10 @@ function WebGLPrograms( renderer, cubemaps, cubeuvmaps, extensions, capabilities
_programLayers.enable( 11 );
if ( parameters.vertexAlphas )
_programLayers.enable( 12 );
if ( parameters.vertexUvs )
_programLayers.enable( 13 );
if ( parameters.vertexUvs2 )
_programLayers.enable( 14 );
_programLayers.enable( 13 );
if ( parameters.vertexTangents )
_programLayers.enable( 15 );
_programLayers.enable( 14 );

array.push( _programLayers.mask );
_programLayers.disableAll();
Expand Down