mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Small refactor.
This commit is contained in:
parent
0381c60b6d
commit
e432a37396
1 changed files with 6 additions and 3 deletions
|
@ -1566,12 +1566,15 @@ void shadowVolumeCreate(ShadowVolume& _shadowVolume
|
|||
const float4_t dot = float4_add(r0, float4_add(r1, r2));
|
||||
const float4_t f = float4_add(dot, vW);
|
||||
|
||||
const float4_t mask = float4_cmpgt(f, float4_zero() );
|
||||
const float4_t tmp0 = float4_and(mask, float4_splat(1.0f) );
|
||||
const float4_t zero = float4_zero();
|
||||
const float4_t mask = float4_cmpgt(f, zero);
|
||||
const float4_t onef = float4_splat(1.0f);
|
||||
const float4_t tmp0 = float4_and(mask, onef);
|
||||
const float4_t tmp1 = float4_ftoi(tmp0);
|
||||
const float4_t tmp2 = float4_xor(tmp1, reverse);
|
||||
const float4_t tmp3 = float4_sll(tmp2, 1);
|
||||
const float4_t tmp4 = float4_isub(tmp3, float4_isplat(1) );
|
||||
const float4_t onei = float4_isplat(1);
|
||||
const float4_t tmp4 = float4_isub(tmp3, onei);
|
||||
|
||||
BX_ALIGN_STRUCT_16(int32_t res[4]);
|
||||
float4_st(&res, tmp4);
|
||||
|
|
Loading…
Reference in a new issue