Cleanup: style, unused
This commit is contained in:
@@ -200,7 +200,7 @@ static void equirect_to_direction(float r[3], float u, float v)
|
|||||||
r[2] = cosf(theta);
|
r[2] = cosf(theta);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void direction_to_cube_face_uv(float r_uv[2], int *r_face, const float dir[3])
|
static void UNUSED_FUNCTION(direction_to_cube_face_uv)(float r_uv[2], int *r_face, const float dir[3])
|
||||||
{
|
{
|
||||||
if (fabsf(dir[0]) > fabsf(dir[1]) && fabsf(dir[0]) > fabsf(dir[2])) {
|
if (fabsf(dir[0]) > fabsf(dir[1]) && fabsf(dir[0]) > fabsf(dir[2])) {
|
||||||
bool is_pos = (dir[0] > 0.0f);
|
bool is_pos = (dir[0] > 0.0f);
|
||||||
|
@@ -41,18 +41,20 @@ void studiolight_update_world(StudioLight *sl, WORKBENCH_UBO_World *wd)
|
|||||||
mul_v3_v3fl(wd->spherical_harmonics_coefs[0], sl->spherical_harmonics_coefs[0], M_1_PI);
|
mul_v3_v3fl(wd->spherical_harmonics_coefs[0], sl->spherical_harmonics_coefs[0], M_1_PI);
|
||||||
/* Swizzle to make shader code simpler. */
|
/* Swizzle to make shader code simpler. */
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
copy_v3_fl3(wd->spherical_harmonics_coefs[i+1], -sl->spherical_harmonics_coefs[3][i],
|
copy_v3_fl3(
|
||||||
sl->spherical_harmonics_coefs[2][i],
|
wd->spherical_harmonics_coefs[i + 1],
|
||||||
-sl->spherical_harmonics_coefs[1][i]);
|
-sl->spherical_harmonics_coefs[3][i],
|
||||||
mul_v3_fl(wd->spherical_harmonics_coefs[i+1], M_1_PI * 1.5f); /* 1.5f is to improve the contrast a bit. */
|
sl->spherical_harmonics_coefs[2][i],
|
||||||
|
-sl->spherical_harmonics_coefs[1][i]);
|
||||||
|
mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], M_1_PI * 1.5f); /* 1.5f is to improve the contrast a bit. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Precompute as much as we can. See shader code for derivation. */
|
/* Precompute as much as we can. See shader code for derivation. */
|
||||||
float len_r1[3], lr1_r0[3], p[3], a[3];
|
float len_r1[3], lr1_r0[3], p[3], a[3];
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
mul_v3_fl(wd->spherical_harmonics_coefs[i+1], 0.5f);
|
mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], 0.5f);
|
||||||
len_r1[i] = len_v3(wd->spherical_harmonics_coefs[i+1]);
|
len_r1[i] = len_v3(wd->spherical_harmonics_coefs[i + 1]);
|
||||||
mul_v3_fl(wd->spherical_harmonics_coefs[i+1], 1.0f / len_r1[i]);
|
mul_v3_fl(wd->spherical_harmonics_coefs[i + 1], 1.0f / len_r1[i]);
|
||||||
}
|
}
|
||||||
/* lr1_r0 = lenR1 / R0; */
|
/* lr1_r0 = lenR1 / R0; */
|
||||||
copy_v3_v3(lr1_r0, wd->spherical_harmonics_coefs[0]);
|
copy_v3_v3(lr1_r0, wd->spherical_harmonics_coefs[0]);
|
||||||
|
@@ -289,7 +289,7 @@ static PyObject *bpygpu_offscreen_free(BPyGPUOffScreen *self)
|
|||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *bpygpu_offscreen_bind_context_enter(BPyGPUOffScreen *self)
|
static PyObject *bpygpu_offscreen_bind_context_enter(BPyGPUOffScreen *UNUSED(self))
|
||||||
{
|
{
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user