#include "physical_sky.h"
#include "precomputed_sky.h"
#include "system/system.h"
#include "../../client/client.h"
#include <time.h>
#include <SDL_joystick.h>
#include <SDL_gamecontroller.h>
Go to the source code of this file.
Macros | |
#define | BARRIER_COMPUTE(cmd_buf, img) |
Enumerations | |
enum | sun_preset_t { SUN_PRESET_NONE = 0, SUN_PRESET_CURRENT_TIME = 1, SUN_PRESET_FAST_TIME = 2, SUN_PRESET_NIGHT = 3, SUN_PRESET_DAWN = 4, SUN_PRESET_MORNING = 5, SUN_PRESET_NOON = 6, SUN_PRESET_EVENING = 7, SUN_PRESET_DUSK = 8, SUN_PRESET_COUNT } |
#define BARRIER_COMPUTE | ( | cmd_buf, | |
img | |||
) |
Definition at line 416 of file physical_sky.c.
enum sun_preset_t |
Enumerator | |
---|---|
SUN_PRESET_NONE | |
SUN_PRESET_CURRENT_TIME | |
SUN_PRESET_FAST_TIME | |
SUN_PRESET_NIGHT | |
SUN_PRESET_DAWN | |
SUN_PRESET_MORNING | |
SUN_PRESET_NOON | |
SUN_PRESET_EVENING | |
SUN_PRESET_DUSK | |
SUN_PRESET_COUNT |
Definition at line 80 of file physical_sky.c.
|
static |
Definition at line 94 of file physical_sky.c.
Referenced by process_gamepad_input(), and vkpt_evaluate_sun_light().
void CalculateDirectionToSun | ( | float | DayOfYear, |
float | TimeOfDay, | ||
float | LatitudeDegrees, | ||
vec3_t | result | ||
) |
Definition at line 1041 of file physical_sky.c.
Referenced by vkpt_evaluate_sun_light().
|
static |
|
static |
Definition at line 1017 of file physical_sky.c.
Referenced by inverseQuat().
Definition at line 112 of file physical_sky.c.
Referenced by initializeEnvTexture(), and vkpt_physical_sky_destroy().
|
static |
Definition at line 1005 of file physical_sky.c.
Referenced by inverseQuat(), and normalizeQuat().
const PhysicalSkyDesc_t* GetSkyPreset | ( | uint16_t | index | ) |
Definition at line 986 of file physical_sky.c.
Referenced by UpdatePhysicalSkyCVars(), vkpt_evaluate_sun_light(), and vkpt_physical_sky_update_ubo().
void InitialiseSkyCVars | ( | ) |
Definition at line 881 of file physical_sky.c.
Referenced by R_Init_RTX().
|
static |
|
static |
Definition at line 1010 of file physical_sky.c.
Referenced by CalculateDirectionToSun().
void physical_sky_cvar_changed | ( | cvar_t * | self | ) |
|
static |
Definition at line 552 of file physical_sky.c.
Referenced by vkpt_evaluate_sun_light().
|
static |
|
static |
|
static |
void UpdatePhysicalSkyCVars | ( | ) |
Definition at line 947 of file physical_sky.c.
Referenced by R_BeginRegistration_RTX(), and vkpt_evaluate_sun_light().
void vkpt_evaluate_sun_light | ( | sun_light_t * | light, |
const vec3_t | sky_matrix[3], | ||
float | time | ||
) |
Definition at line 620 of file physical_sky.c.
Referenced by R_RenderFrame_RTX().
void vkpt_next_sun_preset | ( | ) |
VkResult vkpt_physical_sky_beginRegistration | ( | ) |
VkResult vkpt_physical_sky_create_pipelines | ( | ) |
Definition at line 364 of file physical_sky.c.
VkResult vkpt_physical_sky_destroy | ( | ) |
Definition at line 315 of file physical_sky.c.
VkResult vkpt_physical_sky_destroy_pipelines | ( | ) |
Definition at line 402 of file physical_sky.c.
VkResult vkpt_physical_sky_endRegistration | ( | ) |
VkResult vkpt_physical_sky_initialize | ( | ) |
Definition at line 249 of file physical_sky.c.
void vkpt_physical_sky_latch_local_time | ( | ) |
Definition at line 75 of file physical_sky.c.
Referenced by R_BeginRegistration_RTX().
qboolean vkpt_physical_sky_needs_update | ( | ) |
Definition at line 459 of file physical_sky.c.
Referenced by R_RenderFrame_RTX().
VkResult vkpt_physical_sky_record_cmd_buffer | ( | VkCommandBuffer | cmd_buf | ) |
Definition at line 467 of file physical_sky.c.
Referenced by R_RenderFrame_RTX().
VkResult vkpt_physical_sky_update_ubo | ( | QVKUniformBuffer_t * | ubo, |
const sun_light_t * | light, | ||
qboolean | render_world | ||
) |
Definition at line 774 of file physical_sky.c.
Referenced by R_RenderFrame_RTX().
|
static |
Definition at line 70 of file physical_sky.c.
Referenced by vkpt_evaluate_sun_light(), vkpt_physical_sky_destroy(), and vkpt_physical_sky_initialize().
|
static |
Definition at line 73 of file physical_sky.c.
Referenced by process_gamepad_input(), vkpt_physical_sky_destroy(), and vkpt_physical_sky_initialize().
|
static |
Definition at line 39 of file physical_sky.c.
Referenced by create_centered_orthographic_matrix(), create_orthographic_matrix(), create_projection_matrix(), create_readback_image(), enqueue_stretch_pic(), GL_AllocBlock(), GL_Frustum(), GL_MakePowerOfTwo(), GL_Ortho(), GL_TextureHasAlpha(), GL_Upload32(), GL_Upscale32(), GL_UpscaleLevel(), HQ2x_Render(), HQ4x_Render(), IMG_DecodePCX(), IMG_Load(), IMG_Load_GL(), IMG_MipMap(), IMG_ReadPixels(), IMG_ReadPixels_GL(), IMG_ReadPixels_RTX(), IMG_SAVE(), IMG_Unpack8(), initializeEnvTexture(), MenuList_Draw(), MenuList_Init(), R_DrawStretchData(), R_ModeChanged(), R_ModeChanged_GL(), R_ModeChanged_RTX(), R_PolysetScanLeftEdge(), R_PolysetSetUpAndScanLeftEdge(), R_RasterizeAliasPolySmooth(), R_RegisterRawImage(), SCR_PlayCinematic(), V_CalcFov(), vkpt_physical_sky_initialize(), vkpt_physical_sky_record_cmd_buffer(), vkpt_pt_trace_lighting(), vkpt_shadow_map_create_pipelines(), and vkpt_shadow_map_render().
|
static |
Definition at line 28 of file physical_sky.c.
Referenced by change_image_layouts(), destroyEnvTexture(), initializeEnvTexture(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 29 of file physical_sky.c.
Referenced by destroyEnvTexture(), and initializeEnvTexture().
|
static |
Definition at line 68 of file physical_sky.c.
Referenced by vkpt_evaluate_sun_light(), and vkpt_physical_sky_latch_local_time().
|
static |
Definition at line 30 of file physical_sky.c.
Referenced by destroyEnvTexture(), and initializeEnvTexture().
cvar_t* physical_sky |
Definition at line 55 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), UpdatePhysicalSkyCVars(), vkpt_evaluate_sun_light(), and vkpt_physical_sky_update_ubo().
cvar_t* physical_sky_brightness |
Definition at line 58 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
cvar_t* physical_sky_draw_clouds |
Definition at line 56 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
|
static |
Definition at line 65 of file physical_sky.c.
Referenced by vkpt_physical_sky_beginRegistration(), vkpt_physical_sky_endRegistration(), and vkpt_physical_sky_update_ubo().
|
static |
Definition at line 66 of file physical_sky.c.
Referenced by vkpt_physical_sky_beginRegistration(), vkpt_physical_sky_endRegistration(), and vkpt_physical_sky_update_ubo().
cvar_t* physical_sky_space |
Definition at line 57 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), vkpt_evaluate_sun_light(), vkpt_god_rays_enabled(), vkpt_physical_sky_endRegistration(), vkpt_physical_sky_record_cmd_buffer(), and vkpt_physical_sky_update_ubo().
|
static |
Definition at line 34 of file physical_sky.c.
Referenced by vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_destroy(), vkpt_physical_sky_initialize(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 36 of file physical_sky.c.
Referenced by vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_destroy(), vkpt_physical_sky_initialize(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 32 of file physical_sky.c.
Referenced by vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_destroy_pipelines(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 33 of file physical_sky.c.
Referenced by vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_destroy_pipelines(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 35 of file physical_sky.c.
Referenced by vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_destroy_pipelines(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 72 of file physical_sky.c.
Referenced by vkpt_physical_sky_initialize().
cvar_t* sky_amb_phase_g |
Definition at line 63 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
cvar_t* sky_phase_g |
Definition at line 62 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
cvar_t* sky_scattering |
Definition at line 60 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
cvar_t* sky_transmittance |
Definition at line 61 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
|
static |
Definition at line 41 of file physical_sky.c.
Referenced by physical_sky_cvar_changed(), UpdatePhysicalSkyCVars(), vkpt_evaluate_sun_light(), vkpt_physical_sky_create_pipelines(), vkpt_physical_sky_needs_update(), vkpt_physical_sky_record_cmd_buffer(), and vkpt_physical_sky_update_ubo().
|
static |
Definition at line 965 of file physical_sky.c.
Referenced by GetSkyPreset().
cvar_t* sun_angle |
Definition at line 46 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), UpdatePhysicalSkyCVars(), and vkpt_evaluate_sun_light().
cvar_t* sun_animate |
Definition at line 49 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), process_gamepad_input(), and vkpt_evaluate_sun_light().
cvar_t* sun_azimuth |
Definition at line 45 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), process_gamepad_input(), and vkpt_evaluate_sun_light().
cvar_t* sun_bounce |
Definition at line 48 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_physical_sky_update_ubo().
cvar_t* sun_brightness |
Definition at line 47 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_evaluate_sun_light().
cvar_t* sun_color[3] |
Definition at line 43 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), UpdatePhysicalSkyCVars(), and vkpt_evaluate_sun_light().
cvar_t* sun_elevation |
Definition at line 44 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), process_gamepad_input(), and vkpt_evaluate_sun_light().
cvar_t* sun_gamepad |
Definition at line 50 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and process_gamepad_input().
cvar_t* sun_latitude |
Definition at line 53 of file physical_sky.c.
Referenced by InitialiseSkyCVars(), and vkpt_evaluate_sun_light().
cvar_t* sun_preset |
Definition at line 52 of file physical_sky.c.
Referenced by active_sun_preset(), InitialiseSkyCVars(), and vkpt_next_sun_preset().
float terrain_shadowmap_viewproj[16] |
Definition at line 99 of file precomputed_sky.c.
Referenced by RecordCommandBufferShadowmap(), UpdateTerrainShadowMapView(), and vkpt_physical_sky_record_cmd_buffer().
|
static |
Definition at line 38 of file physical_sky.c.
Referenced by AL_RawSamples(), Con_CheckResize(), create_centered_orthographic_matrix(), create_orthographic_matrix(), create_projection_matrix(), create_readback_image(), D_SCAlloc(), enqueue_stretch_pic(), GetWavinfo(), GL_AllocBlock(), GL_Frustum(), GL_MakePowerOfTwo(), GL_Ortho(), GL_TextureHasAlpha(), GL_Upload32(), GL_Upscale32(), GL_UpscaleLevel(), HQ2x_Render(), HQ4x_Render(), HUD_DrawNumber(), IMG_DecodePCX(), IMG_Load(), IMG_Load_GL(), IMG_MipMap(), IMG_ReadPixels(), IMG_ReadPixels_GL(), IMG_ReadPixels_RTX(), IMG_SAVE(), IMG_Unpack8(), initializeEnvTexture(), Menu_Size(), MenuList_Draw(), Parse_Field(), R_DrawStretchData(), R_ModeChanged(), R_ModeChanged_GL(), R_ModeChanged_RTX(), R_RegisterRawImage(), S_RawSamples(), SCR_ExecuteLayoutString(), SCR_PlayCinematic(), SP_func_door_secret(), TH_DrawLayoutString(), TH_DrawNumber(), V_CalcFov(), vkpt_physical_sky_initialize(), and vkpt_physical_sky_record_cmd_buffer().