Merge branch 'blender-v2.90-release'
This commit is contained in:
commit
784adccf47
@ -1143,9 +1143,11 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
|
|||||||
BYTE state[256] = {0};
|
BYTE state[256] = {0};
|
||||||
int r;
|
int r;
|
||||||
GetKeyboardState((PBYTE)state);
|
GetKeyboardState((PBYTE)state);
|
||||||
|
bool ctrl_pressed = state[VK_CONTROL] & 0x80;
|
||||||
|
bool alt_pressed = state[VK_MENU] & 0x80;
|
||||||
|
|
||||||
/* No text with control key pressed. */
|
/* No text with control key pressed (Alt can be used to insert special characters though!). */
|
||||||
if (state[VK_CONTROL] & 0x80) {
|
if (ctrl_pressed && !alt_pressed) {
|
||||||
utf8_char[0] = '\0';
|
utf8_char[0] = '\0';
|
||||||
}
|
}
|
||||||
// Don't call ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
|
// Don't call ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
|
||||||
|
@ -178,8 +178,9 @@ static void ArHosekSkyModel_CookConfiguration(ArHosekSkyModel_Dataset dataset,
|
|||||||
pow(solar_elevation, 5.0) * elev_matrix[i + 45]);
|
pow(solar_elevation, 5.0) * elev_matrix[i + 45]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int_turbidity == 10)
|
if (int_turbidity == 10) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// alb 0 high turb
|
// alb 0 high turb
|
||||||
elev_matrix = dataset + (9 * 6 * (int_turbidity));
|
elev_matrix = dataset + (9 * 6 * (int_turbidity));
|
||||||
@ -243,8 +244,9 @@ static double ArHosekSkyModel_CookRadianceConfiguration(ArHosekSkyModel_Radiance
|
|||||||
10.0 * pow(1.0 - solar_elevation, 2.0) * pow(solar_elevation, 3.0) * elev_matrix[3] +
|
10.0 * pow(1.0 - solar_elevation, 2.0) * pow(solar_elevation, 3.0) * elev_matrix[3] +
|
||||||
5.0 * (1.0 - solar_elevation) * pow(solar_elevation, 4.0) * elev_matrix[4] +
|
5.0 * (1.0 - solar_elevation) * pow(solar_elevation, 4.0) * elev_matrix[4] +
|
||||||
pow(solar_elevation, 5.0) * elev_matrix[5]);
|
pow(solar_elevation, 5.0) * elev_matrix[5]);
|
||||||
if (int_turbidity == 10)
|
if (int_turbidity == 10) {
|
||||||
return res;
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
// alb 0 high turb
|
// alb 0 high turb
|
||||||
elev_matrix = dataset + (6 * (int_turbidity));
|
elev_matrix = dataset + (6 * (int_turbidity));
|
||||||
@ -298,16 +300,18 @@ double SKY_arhosekskymodel_radiance(SKY_ArHosekSkyModelState *state,
|
|||||||
{
|
{
|
||||||
int low_wl = (int)((wavelength - 320.0) / 40.0);
|
int low_wl = (int)((wavelength - 320.0) / 40.0);
|
||||||
|
|
||||||
if (low_wl < 0 || low_wl >= 11)
|
if (low_wl < 0 || low_wl >= 11) {
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
double interp = fmod((wavelength - 320.0) / 40.0, 1.0);
|
double interp = fmod((wavelength - 320.0) / 40.0, 1.0);
|
||||||
|
|
||||||
double val_low = ArHosekSkyModel_GetRadianceInternal(state->configs[low_wl], theta, gamma) *
|
double val_low = ArHosekSkyModel_GetRadianceInternal(state->configs[low_wl], theta, gamma) *
|
||||||
state->radiances[low_wl] * state->emission_correction_factor_sky[low_wl];
|
state->radiances[low_wl] * state->emission_correction_factor_sky[low_wl];
|
||||||
|
|
||||||
if (interp < 1e-6)
|
if (interp < 1e-6) {
|
||||||
return val_low;
|
return val_low;
|
||||||
|
}
|
||||||
|
|
||||||
double result = (1.0 - interp) * val_low;
|
double result = (1.0 - interp) * val_low;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user