Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/LOSTexture.cpp
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | const uint32_t usage = | ||||
Renderer::Backend::ITexture::Usage::SAMPLED | | Renderer::Backend::ITexture::Usage::SAMPLED | | ||||
Renderer::Backend::ITexture::Usage::COLOR_ATTACHMENT; | Renderer::Backend::ITexture::Usage::COLOR_ATTACHMENT; | ||||
m_SmoothTextures[0] = backendDevice->CreateTexture2D("LOSSmoothTexture0", | m_SmoothTextures[0] = backendDevice->CreateTexture2D("LOSSmoothTexture0", | ||||
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc); | usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc); | ||||
m_SmoothTextures[1] = backendDevice->CreateTexture2D("LOSSmoothTexture1", | m_SmoothTextures[1] = backendDevice->CreateTexture2D("LOSSmoothTexture1", | ||||
usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc); | usage, m_TextureFormat, textureSize, textureSize, defaultSamplerDesc); | ||||
m_SmoothFramebuffers[0] = backendDevice->CreateFramebuffer( | m_SmoothFramebuffers[0] = backendDevice->CreateFramebuffer( | ||||
"LOSSmoothFramebuffer0", m_SmoothTextures[0].get(), nullptr); | "LOSSmoothFramebuffer0", m_SmoothTextures[0].get(), | ||||
Renderer::Backend::AttachmentLoadOp::DONT_CARE, | |||||
Renderer::Backend::AttachmentStoreOp::STORE, | |||||
CColor(0.0f, 0.0f, 0.0f, 0.0f), nullptr, | |||||
Renderer::Backend::AttachmentLoadOp::DONT_CARE, | |||||
Renderer::Backend::AttachmentStoreOp::DONT_CARE); | |||||
m_SmoothFramebuffers[1] = backendDevice->CreateFramebuffer( | m_SmoothFramebuffers[1] = backendDevice->CreateFramebuffer( | ||||
"LOSSmoothFramebuffer1", m_SmoothTextures[1].get(), nullptr); | "LOSSmoothFramebuffer1", m_SmoothTextures[1].get(), | ||||
Renderer::Backend::AttachmentLoadOp::DONT_CARE, | |||||
Renderer::Backend::AttachmentStoreOp::STORE, | |||||
CColor(0.0f, 0.0f, 0.0f, 0.0f), nullptr, | |||||
Renderer::Backend::AttachmentLoadOp::DONT_CARE, | |||||
Renderer::Backend::AttachmentStoreOp::DONT_CARE); | |||||
if (!m_SmoothFramebuffers[0] || !m_SmoothFramebuffers[1]) | if (!m_SmoothFramebuffers[0] || !m_SmoothFramebuffers[1]) | ||||
{ | { | ||||
LOGERROR("Failed to create LOS framebuffers"); | LOGERROR("Failed to create LOS framebuffers"); | ||||
g_RenderingOptions.SetSmoothLOS(false); | g_RenderingOptions.SetSmoothLOS(false); | ||||
} | } | ||||
deviceCommandContext->UploadTexture( | deviceCommandContext->UploadTexture( | ||||
m_SmoothTextures[0].get(), m_TextureFormat, texData.get(), textureDataSize); | m_SmoothTextures[0].get(), m_TextureFormat, texData.get(), textureDataSize); | ||||
▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator