Skip to content

Commit

Permalink
Fix Terra crash when building w/ specific CMake variable
Browse files Browse the repository at this point in the history
Terra was crashing if OGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY was
enabled.
  • Loading branch information
darksylinc committed Jun 17, 2024
1 parent 6f1b0d0 commit 3b711b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ struct CellData

@undefpiece( DeclareObjLightMask )
@property( hlms_fine_light_mask || hlms_forwardplus_fine_light_mask )
// Currently unimplemented (also makes little sense since there's nothing fine granularity to do).
@property( syntax == metal )
@piece( DeclareObjLightMask )uint objLightMask = 0xFFFFFFFFu;@end
@else
Expand Down
7 changes: 5 additions & 2 deletions Samples/Media/Hlms/Terra/Any/800.VertexShader_piece_vs.any
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@

@property( syntax == metal || lower_gpu_overhead )
@property( hlms_fine_light_mask || hlms_forwardplus_fine_light_mask )
outVs.objLightMask = worldMaterialIdx[inVs_drawId].z;
// Currently unimplemented (also makes little sense since there's nothing fine granularity to do).
outVs.objLightMask = 0xFFFFFFFF;
// outVs.objLightMask = worldMaterialIdx[inVs_drawId].z;
@end

@property( use_planar_reflections )
outVs.planarReflectionIdx = (ushort)(worldMaterialIdx[inVs_drawId].w);
#error "Unimplemented Feature: Using Terra as Planar Reflections"
// outVs.planarReflectionIdx = (ushort)(worldMaterialIdx[inVs_drawId].w);
@end
@else
@property( (!hlms_shadowcaster || alpha_test) && !lower_gpu_overhead )
Expand Down

0 comments on commit 3b711b4

Please sign in to comment.