mipmaps
This commit is contained in:
@ -51,7 +51,14 @@ namespace ia::iae
|
||||
|
||||
SDL_GPUColorTargetDescription colorTargetDesc = {
|
||||
.format = Renderer::GetRenderTargetFormat(),
|
||||
};
|
||||
.blend_state = {.src_color_blendfactor = SDL_GPU_BLENDFACTOR_ONE,
|
||||
.dst_color_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
|
||||
.color_blend_op = SDL_GPU_BLENDOP_ADD,
|
||||
.src_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE,
|
||||
.dst_alpha_blendfactor = SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA,
|
||||
.alpha_blend_op = SDL_GPU_BLENDOP_ADD,
|
||||
.enable_blend = true,
|
||||
.enable_color_write_mask = false}};
|
||||
|
||||
SDL_GPUVertexBufferDescription vertexBufferDesc = {
|
||||
.slot = 0,
|
||||
@ -85,16 +92,15 @@ namespace ia::iae
|
||||
.front_face = SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE},
|
||||
.depth_stencil_state = SDL_GPUDepthStencilState{.compare_op = SDL_GPU_COMPAREOP_GREATER_OR_EQUAL,
|
||||
.write_mask = 0xFF,
|
||||
.enable_depth_test = enableDepthTest,
|
||||
.enable_depth_write = enableDepthTest,
|
||||
.enable_depth_test = false,
|
||||
.enable_depth_write = false,
|
||||
.enable_stencil_test = false},
|
||||
.target_info = {.color_target_descriptions = &colorTargetDesc,
|
||||
.num_color_targets = 1,
|
||||
.depth_stencil_format = SDL_GPU_TEXTUREFORMAT_D16_UNORM,
|
||||
.has_depth_stencil_target = enableDepthTest},
|
||||
.has_depth_stencil_target = false},
|
||||
};
|
||||
|
||||
if(!(m_handle = SDL_CreateGPUGraphicsPipeline(Renderer::GetDevice(), &createInfo)))
|
||||
if (!(m_handle = SDL_CreateGPUGraphicsPipeline(Renderer::GetDevice(), &createInfo)))
|
||||
THROW_UNKNOWN("Failed to create a SDL graphics pipeline: ", SDL_GetError());
|
||||
|
||||
SDL_ReleaseGPUShader(Renderer::GetDevice(), pixelShader);
|
||||
|
||||
Reference in New Issue
Block a user