summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render.c4
-rw-r--r--src/shader.frag6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/render.c b/src/render.c
index 6ff1f9e..0f1b12d 100644
--- a/src/render.c
+++ b/src/render.c
@@ -395,10 +395,10 @@ vulkan_create_graphics_pipeline(VkPolygonMode polygon_mode)
long vert_size = shaderc_result_get_length(vert_result);
const char * frag_data = shaderc_result_get_bytes(frag_result);
long frag_size = shaderc_result_get_length(frag_result);
- vk_log(VK_INFO, "Shaders loaded\n");
VkShaderModule vertShaderModule = createShaderModule(vert_data, vert_size);
VkShaderModule fragShaderModule = createShaderModule(frag_data, frag_size);
+ vk_log(VK_INFO, "Shaders loaded\n");
VkPipelineShaderStageCreateInfo vertShaderStageInfo = {0};
vertShaderStageInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
@@ -692,7 +692,7 @@ recordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex)
vkCmdDrawIndexed(commandBuffer, s.indices_count, 1, 0, 0, 0);
- imgui_draw(); // does this need to be here?
+ imgui_draw();
imgui_draw_cmd(commandBuffer);
vkCmdEndRendering(commandBuffer);
diff --git a/src/shader.frag b/src/shader.frag
index 88015c4..fc16ceb 100644
--- a/src/shader.frag
+++ b/src/shader.frag
@@ -17,9 +17,9 @@ layout(binding = 0) uniform UniformBufferObject {
} ubo;
void main() {
- // float pulse = sin(ubo.time * .2) * .5 + .5;
- // outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb * pulse, 1.0);
- outColor = texture(texSampler, fragTexCoord);
+ float pulse = sin(ubo.time * 20) * .5 + .5;
+ outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb * pulse, 1.0);
+ // outColor = texture(texSampler, fragTexCoord);
//outColor = vec4(fragColor, 1);
// float repeat = 10;
// float f = zmod(ubo.time, repeat);