Skip to content

Commit bdf7f01

Browse files
committed
fix: base color map selection
1 parent c64f449 commit bdf7f01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/pl_renderer_internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2364,7 +2364,7 @@ pl_material_fill_gpu_data(const plMaterialComponent* ptComp, plGpuMaterial* ptMa
23642364
ptMaterial->iEmissiveUVSet = (int)ptComp->atTextureMaps[PL_TEXTURE_SLOT_EMISSIVE_MAP].uUVSet;
23652365
ptMaterial->iOcclusionUVSet = (int)ptComp->atTextureMaps[PL_TEXTURE_SLOT_OCCLUSION_MAP].uUVSet;
23662366
ptMaterial->iMetallicRoughnessUVSet = (int)ptComp->atTextureMaps[PL_TEXTURE_SLOT_METAL_ROUGHNESS_MAP].uUVSet;
2367-
ptMaterial->iBaseColorTexIdx = gptResource->is_valid(ptComp->atTextureMaps[PL_TEXTURE_SLOT_METAL_ROUGHNESS_MAP].tResource) ? 0 : -1;
2367+
ptMaterial->iBaseColorTexIdx = gptResource->is_valid(ptComp->atTextureMaps[PL_TEXTURE_SLOT_BASE_COLOR_MAP].tResource) ? 0 : -1;
23682368
ptMaterial->iNormalTexIdx = gptResource->is_valid(ptComp->atTextureMaps[PL_TEXTURE_SLOT_NORMAL_MAP].tResource) ? 0 : -1;
23692369
ptMaterial->iEmissiveTexIdx = gptResource->is_valid(ptComp->atTextureMaps[PL_TEXTURE_SLOT_EMISSIVE_MAP].tResource) ? 0 : -1;
23702370
ptMaterial->iMetallicRoughnessTexIdx = gptResource->is_valid(ptComp->atTextureMaps[PL_TEXTURE_SLOT_METAL_ROUGHNESS_MAP].tResource) ? 0 : -1;

0 commit comments

Comments
 (0)