@@ -194,12 +194,8 @@ FaceQuad GetFaceQuad(BlockElement& element, BlockFace direction) {
194194inline bool IsOccluding (BlockModel* from, BlockModel* to, BlockFace face) {
195195 BlockFace opposite_face = world::GetOppositeFace (face);
196196
197- bool from_is_transparent = !HasOccludableFace (*from, face);
198- bool to_is_transparent = !HasOccludableFace (*to, opposite_face);
199-
200197 // TODO: Clean this up once rotation is settled.
201198 if (to->element_count == 0 ) return false ;
202- // if (from->has_variant_rotation || to->has_variant_rotation) return false;
203199 if (to->has_leaves || !to->has_shaded ) return false ;
204200
205201 for (size_t i = 0 ; i < from->element_count ; ++i) {
@@ -220,16 +216,16 @@ inline bool IsOccluding(BlockModel* from, BlockModel* to, BlockFace face) {
220216 // Check if the element of the 'to' model fully occludes the 'from' face
221217 if (to_start.x <= from_start.x && to_start.y <= from_start.y && to_start.z <= from_start.z &&
222218 to_end.x >= from_end.x && to_end.y >= from_end.y && to_end.z >= from_end.z ) {
223- if (to_is_transparent ) {
224- if (from_is_transparent ) {
225- return true ;
219+ if (to_face. transparency ) {
220+ if (from_face. transparency ) {
221+ return from_face. texture_id == to_face. texture_id ;
226222 }
227223 return false ;
228224 }
229225
230- if (from_is_transparent ) {
231- if (to_is_transparent ) {
232- return true ;
226+ if (from_face. transparency ) {
227+ if (to_face. transparency ) {
228+ return from_face. texture_id == to_face. texture_id ;
233229 }
234230 return false ;
235231 }
0 commit comments