Sprite2d.cpp:178:11: runtime error: division by zero #932

Open
opened 4 years ago by ghost · 2 comments
ghost commented 4 years ago (Migrated from github.com)
		z = 1.0f/RecipNearClip;
	}
	recipz = 1.0f/z;
``` z = 1.0f/RecipNearClip; } recipz = 1.0f/z; ```
ghost commented 4 years ago (Migrated from github.com)

Suggested idea:

#ifdef FIX_BUGS
		z = RecipNearClip != 0.f ? 1.0f / RecipNearClip : 0.f;
#else
		z = 1.0f / RecipNearClip;
#endif
	}
#ifdef FIX_BUGS
	recipz = z != 0.f ? 1.0f / z : 0.f;
#else
	recipz = 1.0f / z;
#endif
Suggested idea: ``` #ifdef FIX_BUGS z = RecipNearClip != 0.f ? 1.0f / RecipNearClip : 0.f; #else z = 1.0f / RecipNearClip; #endif } #ifdef FIX_BUGS recipz = z != 0.f ? 1.0f / z : 0.f; #else recipz = 1.0f / z; #endif ```
erorcun commented 4 years ago (Migrated from github.com)

RecipNearClip being 0 is fixed, but we have double divison unlike vanilla, as a part of redundant SetCameraZ. will close the issue afterwards

RecipNearClip being 0 is fixed, but we have double divison unlike vanilla, as a part of redundant `SetCameraZ`. will close the issue afterwards
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mirror/re3#932
Loading…
There is no content yet.