Commit cb59615
committed
Fix code alignment and remove trailing whitespace
Aligns variable declarations and inline comments to improve code readability. Removes trailing whitespace from empty lines.
Human: [Commits history]
Update: Support more than one joint in .arm files
Also adds names to the joints based on the Blender names.
Add support for loading .arm files from Blender/Armory for GPU skinning
# Conflicts:
# framework/rendering/subpasses/forward_subpass.cpp
# framework/scene_graph/components/sub_mesh.cpp
Fix compute shader derivatives sample descriptor set update timing
Moves descriptor set writes to prepare() to ensure resources are updated before first use, addressing potential rendering issues from accessing uninitialized descriptors.
Enhance compute shader derivatives sample with practical visualization
Extends the compute shader derivatives sample to demonstrate a practical use case: gradient-based edge detection on a procedural radial pattern. Adds a two-stage rendering pipeline where a compute shader calculates spatial derivatives and gradient magnitude, writing to a storage image, then a graphics pipeline displays the result using a fullscreen triangle technique. Includes comprehensive documentation explaining derivative computation, rendering architecture, and the fullscreen triangle optimization. Requires shader storage image read/write features and shader draw parameters extension.
Revert "add shader quad control sample demonstrating VK_KHR_shader_quad_control features."
This reverts commit d9524ac.
add shader quad control sample demonstrating VK_KHR_shader_quad_control features.
Add compute shader derivatives sample for Vulkan extension
Introduce a sample demonstrating the `VK_KHR_compute_shader_derivatives` extension. Includes new shader, CMake, and Vulkan application files showcasing the use of derivative instructions in compute shaders with quad-based derivative groups.
bash might not work with nmake
let's try nmake
try to diagnose what's happening.
try to diagnose what's happening.
astc can't find sys/time.h when using sccache.
[Message]
[Diff]
--- a/samples/extensions/compute_shader_derivatives/compute_shader_derivatives.cpp
+++ b/samples/extensions/compute_shader_derivatives/compute_shader_derivatives.cpp
@@ -175,9 +175,9 @@
// Require quads derivative group (the sample shader uses layout(derivative_group_quadsNV/derivative_group_quads_khr))
REQUEST_REQUIRED_FEATURE(gpu, VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR, computeDerivativeGroupQuads);
// Users may switch to the linear mode by changing the shader qualifier
-
+
// Storage image read/write without format (required for storage images without explicit format qualifiers)
- gpu.get_mutable_requested_features().shaderStorageImageReadWithoutFormat = VK_TRUE;
+ gpu.get_mutable_requested_features().shaderStorageImageReadWithoutFormat = VK_TRUE;
gpu.get_mutable_requested_features().shaderStorageImageWriteWithoutFormat = VK_TRUE;
}
@@ -335,7 +335,7 @@
color_blend_ci.pAttachments = &blend_attachment;
// Dynamic state
- VkDynamicState dynamic_states[] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
+ VkDynamicState dynamic_states[] = {VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR};
VkPipelineDynamicStateCreateInfo dynamic_ci{VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO};
dynamic_ci.dynamicStateCount = 2;
dynamic_ci.pDynamicStates = dynamic_states;
@@ -435,7 +435,7 @@
// Begin render pass to display the computed image and GUI
VkClearValue clear_values[2];
- clear_values[0].color = {{0.0f, 0.0f, 0.0f, 1.0f}}; // Clear to black (will be covered by image)
+ clear_values[0].color = {{0.0f, 0.0f, 0.0f, 1.0f}}; // Clear to black (will be covered by image)
clear_values[1].depthStencil = {1.0f, 0};
VkRenderPassBeginInfo render_pass_begin_info = vkb::initializers::render_pass_begin_info();
@@ -464,7 +464,7 @@
// Render the computed image as a fullscreen quad
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, graphics_pipeline);
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, graphics_pipeline_layout, 0, 1, &graphics_descriptor_set, 0, nullptr);
- vkCmdDraw(cmd, 3, 1, 0, 0); // Draw fullscreen triangle (3 vertices)
+ vkCmdDraw(cmd, 3, 1, 0, 0); // Draw fullscreen triangle (3 vertices)
// Draw the GUI overlay on top
draw_ui(cmd);
@@ -501,7 +501,7 @@
drawer.text("- Red/Yellow: Edges (high gradient magnitude)");
drawer.text("- Gradient magnitude = sqrt(dx^2 + dy^2)");
drawer.text("");
-
+
drawer.text("This demonstrates edge detection using compute shader");
drawer.text("derivatives, useful for LOD selection, filtering, and");
drawer.text("spatial analysis in compute pipelines.");1 parent 164d342 commit cb59615
1 file changed
Lines changed: 6 additions & 6 deletions
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
0 commit comments