Added capture and features to readme

This commit is contained in:
connellpaxton 2024-02-09 08:44:40 -05:00
parent caff659c1f
commit 1ce25b26bd
5 changed files with 10 additions and 3 deletions

View File

@ -1,5 +1,12 @@
# Pléascach # Pléascach
Small Vulkan 3D renderer.
![really cool wireframe tessellated terrain)](capture.png "Terrain Capture")
## Features
- glTF Model loading
- Tessellation-controlled heightmap terrains with dynamic normal calculation
- Working lighting!
## Short Term Changes ## Short Term Changes
- Make index buffer device-local instead of host-coherent - Make index buffer device-local instead of host-coherent
- Possibly restructure Buffer class to use templates to change - Possibly restructure Buffer class to use templates to change

View File

@ -93,7 +93,7 @@ GraphicsPipeline::GraphicsPipeline(vk::Device dev, const std::vector<Shader>& sh
const auto raster_info = vk::PipelineRasterizationStateCreateInfo { const auto raster_info = vk::PipelineRasterizationStateCreateInfo {
.depthClampEnable = vk::False, .depthClampEnable = vk::False,
.polygonMode = type == Type::eGLTF? vk::PolygonMode::eFill : vk::PolygonMode::eFill, .polygonMode = type == Type::eGLTF? vk::PolygonMode::eFill : vk::PolygonMode::eLine,
.cullMode = vk::CullModeFlagBits::eNone, .cullMode = vk::CullModeFlagBits::eNone,
.frontFace = Type::eGLTF ? vk::FrontFace::eClockwise : vk::FrontFace::eCounterClockwise, .frontFace = Type::eGLTF ? vk::FrontFace::eClockwise : vk::FrontFace::eCounterClockwise,
.depthBiasEnable = vk::False, .depthBiasEnable = vk::False,

View File

@ -23,7 +23,7 @@ void main() {
/* extract L (light direction) from view matrix */ /* extract L (light direction) from view matrix */
vec3 L = -cam_dir; vec3 L = -cam_dir;
float r = length(cam_pos-pos); float r = length(cam_pos-pos);
float t = clamp(dot(L, norm), 0.0, 1.0) * 20.0/(r*r); float t = clamp(dot(L, norm), 0.0, 1.0) * 200.0/(r*r);
FragColor = vec4(t*norm, 1.0); FragColor = vec4(vec3(t), 1.0);
} }

Binary file not shown.

BIN
capture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 KiB