DX12: skybox.
This commit is contained in:
parent
062ad9974d
commit
12da3b4d44
|
|
@ -372,6 +372,18 @@ void dx_initialize() {
|
|||
// Standard pipelines.
|
||||
//
|
||||
|
||||
// skybox
|
||||
{
|
||||
Vk_Pipeline_Def def;
|
||||
def.shader_type = Vk_Shader_Type::single_texture;
|
||||
def.state_bits = 0;
|
||||
def.face_culling = CT_FRONT_SIDED;
|
||||
def.polygon_offset = false;
|
||||
def.clipping_plane = false;
|
||||
def.mirror = false;
|
||||
dx.skybox_pipeline_state = create_pipeline(def);
|
||||
}
|
||||
|
||||
// Q3 stencil shadows
|
||||
{
|
||||
{
|
||||
|
|
@ -448,6 +460,7 @@ void dx_initialize() {
|
|||
}
|
||||
|
||||
void dx_shutdown() {
|
||||
dx.skybox_pipeline_state->Release();
|
||||
dx.shadow_finish_pipeline_state->Release();
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
|
|
|
|||
|
|
@ -451,7 +451,8 @@ static void DrawSkyBox( shader_t *shader )
|
|||
sky_maxs_subd );
|
||||
|
||||
// VULKAN: draw skybox side
|
||||
if (vk.active) {
|
||||
// DX12
|
||||
if (vk.active || dx.active) {
|
||||
GL_Bind(shader->sky.outerbox[sky_texorder[i]]);
|
||||
|
||||
tess.numVertexes = 0;
|
||||
|
|
@ -494,8 +495,14 @@ static void DrawSkyBox( shader_t *shader )
|
|||
|
||||
Com_Memset( tess.svars.colors, tr.identityLightByte, tess.numVertexes * 4 );
|
||||
|
||||
vk_bind_geometry();
|
||||
vk_shade_geometry(vk.skybox_pipeline, false, r_showsky->integer ? Vk_Depth_Range::force_zero : Vk_Depth_Range::force_one);
|
||||
if (vk.active) {
|
||||
vk_bind_geometry();
|
||||
vk_shade_geometry(vk.skybox_pipeline, false, r_showsky->integer ? Vk_Depth_Range::force_zero : Vk_Depth_Range::force_one);
|
||||
}
|
||||
if (dx.active) {
|
||||
dx_bind_geometry();
|
||||
dx_shade_geometry(dx.skybox_pipeline_state, false, r_showsky->integer ? Vk_Depth_Range::force_zero : Vk_Depth_Range::force_one);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user