Skip to content

Commit e71cbde

Browse files
committed
shadow patch
1 parent 2d28043 commit e71cbde

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

assets/shaders/shadow_maps.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
layout(binding = 2) uniform sampler2D shadowMaps[];
66

7-
float texelSize = 1.0f/10000.0f;
7+
float texelSize = 0.5f/10000.0f;
88

99
float getShadow(vec4 lightSpacePosition) {
1010

src/engine/game-application.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,6 @@ class GameApplication {
432432
averageTime += frametimes[i];
433433
}
434434
averageTime /= 60.0f;
435-
436-
interface.drawRect(*vulkan,Rect(50,50),Color::white,Sprite(0,Rect::unitSquare),registry.getMaterial("shadow_test"));
437435

438436
// vulkan->mainLight.direction = vulkan->mainLight.direction * glm::quat(glm::radians(vec3(0,dt*90,0)));
439437
// std::cout << StringHelper::toString(vulkan->mainLight.direction) << std::endl;

src/graphics/vulkan.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class Vulkan {
183183
Color ambientLight = Color(0.1f,0.1f,0.1f);
184184

185185
unsigned int shadowMapSize = 10000;
186-
float shadowDist = 20;
186+
float shadowDist = 50;
187187

188188
Vulkan(string name,GLFWwindow* window) {
189189
this->window = window;
@@ -197,7 +197,7 @@ class Vulkan {
197197
createImageViews();
198198
createRenderPass();
199199
createCommandPool();
200-
createFrameCommandBuffers();
200+
createFrameCommandBuffers();
201201
createDepthResources();
202202
createShadowResources();
203203
createFrameBuffers();

0 commit comments

Comments
 (0)