Fixed trajectory rendering, added text size and solved vulkan errors #382

Merged
Xenosas1337 merged 4 commits from SP3-1-Rendering into main 2023-03-02 16:32:37 +08:00
4 changed files with 3 additions and 3 deletions
Showing only changes of commit 61a877cee1 - Show all commits

View File

@ -37,7 +37,7 @@ layout(location = 1) out uint outEntityID;
void main() void main()
{ {
fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv); fragColor = texture(textures[nonuniformEXT(MatProp.data[In2.materialIndex].textureIndex)], In.uv);
if (fragColor.a < 0.01f) if (fragColor.a < 0.1f)
{ {
discard; discard;
} }

Binary file not shown.

View File

@ -262,7 +262,7 @@ namespace SHADE
copyRegions[i].imageSubresource.baseArrayLayer = 0; // TODO: Array textures not supported yet copyRegions[i].imageSubresource.baseArrayLayer = 0; // TODO: Array textures not supported yet
copyRegions[i].imageSubresource.layerCount = layerCount; copyRegions[i].imageSubresource.layerCount = layerCount;
copyRegions[i].imageOffset = vk::Offset3D{ 0,0,0 }; copyRegions[i].imageOffset = vk::Offset3D{ 0,0,0 };
copyRegions[i].imageExtent = vk::Extent3D{ width >> i, height >> i, 1 }; copyRegions[i].imageExtent = vk::Extent3D{ std::max (1u, width >> i), std::max (1u, height >> i), 1 };
} }
cmdBufferHdl->CopyBufferToImage(stagingBuffer, vkImage, copyRegions); cmdBufferHdl->CopyBufferToImage(stagingBuffer, vkImage, copyRegions);

View File

@ -71,7 +71,7 @@ namespace SHADE
//! of the texture library would mean the recreation of the desc set that also //! of the texture library would mean the recreation of the desc set that also
//! involves the generic data, which is bad bad bad. Solution is to separate the //! involves the generic data, which is bad bad bad. Solution is to separate the
//! 2 desc sets. //! 2 desc sets.
static constexpr uint32_t DEFAULT_MAX_TEXTURES = 2000; static constexpr uint32_t DEFAULT_MAX_TEXTURES = 1000;
/*-----------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------*/
/* Usage Functions */ /* Usage Functions */