Alpha Blending
This commit is contained in:
@ -39,7 +39,16 @@ namespace ia::iae
|
||||
const auto pixelShader = LoadShaderFromMemory(ShaderStage::PIXEL, SHADER_SOURCE_UNLITMESH_FRAG, sizeof(SHADER_SOURCE_UNLITMESH_FRAG), 1, 1, 0, 0);
|
||||
|
||||
SDL_GPUColorTargetDescription colorTargets[] = {
|
||||
{.format = SDL_GetGPUSwapchainTextureFormat(g_gpuDevice, g_windowHandle)}};
|
||||
{.format = SDL_GetGPUSwapchainTextureFormat(g_gpuDevice, g_windowHandle),
|
||||
.blend_state = SDL_GPUColorTargetBlendState{
|
||||
.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,
|
||||
}}};
|
||||
SDL_GPUVertexBufferDescription vertexBuffers[] = {{
|
||||
.slot = 0,
|
||||
.pitch = sizeof(Vertex_Mesh),
|
||||
|
||||
Reference in New Issue
Block a user