Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pannapudi committed Jul 6, 2024
1 parent 5ccc2e5 commit 6a55407
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
38 changes: 2 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Available features:

- [x] Hot-reload
- [x] Saving shaders
- [x] Taking screenshot
- [x] Record video
- [x] Taking screenshots
- [x] Recording videos
- [x] Compute pipeline for post processing

![preview](menger_sponge.png)
Expand All @@ -30,8 +30,6 @@ emacs, vim, ed etc.) and `pilka` would fetch changes after each save.
- <kbd>F4</kbd>: Pause and step forward one frame
- <kbd>F5</kbd>: Restart playback at frame 0 (`Time` and `Pos` = 0)
- <kbd>F6</kbd>: Print parameters
- <kbd>F7</kbd>: Toggle profiler
- <kbd>F8</kbd>: Switch backend
- <kbd>F10</kbd>: Save shaders
- <kbd>F11</kbd>: Take Screenshot
- <kbd>F12</kbd>: Start/Stop record video
Expand All @@ -58,13 +56,6 @@ emacs, vim, ed etc.) and `pilka` would fetch changes after each save.

- `--record f32` - Specify duration of recorded video
- `--size u32xu32` - Specify window size and lock from resizing
- `--wgsl` - Creates template for `wgsl` shaders

## Choosing backend

You can select which backend to start with with the `PILKA_BACKEND` variable.
Currently two backends are available: "wgpu" and "ash". If the value of the
variable is incorrect, the default backend "wgpu" will be rolled back.

## Requirements

Expand Down Expand Up @@ -101,39 +92,14 @@ the most of cross-platform issues for you.

[notify](https://crates.io/crates/notify) is a file watcher and maintains the hot-reload.

[naga](https://crates.io/crates/naga) is used to compile GLSL shaders on the runtime.

[ash](https://crates.io/crates/ash) is a Vulkan bindings. I choose `ash` because I see `pilka` as a
learning project and want to touch the maximum untouched Vulkan. For the
same reason I didn't use `vulkano`, `erupt`, `vulkanism`, `vkvk`.

[wgpu](https://github.com/gfx-rs/wgpu) is save GPU abstraction over different graphics API like
Vulkan, Metal, OpenGL and used for primary backend aside of `ash`.

[puffin](https://github.com/EmbarkStudios/puffin) is scoped profiler written in Rust by [EmbarkStudios](https://github.com/EmbarkStudios) and I baked it to `pilka` for fast performance checking.

[pollster](https://github.com/zesterer/pollster) is smol blocking executor and needed for eliminating
async `wgpu` API.

**Ffmpeg** is used to record videos. For my concerns it's
temporary solution after which I switch to [rav1e](https://github.com/xiph/rav1e) on it's release.

### Places of inspiration (from where I steal code):

- [piet-gpu](https://github.com/linebender/piet-gpu)
- https://github.com/w23/OpenSource

## Examples
You can run any example by executing `pilka` inside of the folder
```bash
cd examples/cube
cargo run
```

| cube | cellular automata | line segment |
|-----------------------------------------------------|-----------------------------------------------------------------|---------------------------------------------------|
| ![cube](./examples/cube/cube.gif) | ![automata](./examples/cellular_automata/cellular-automata.gif) | ![line](./examples/line_segment/line-segment.png) |
| dithering | circle pattern | menger sponge |
| ![dithering](./examples/dithering/dithering.png) | ![pattern](./examples/circle_pattern/circle-pattern.png) | ![spoonge](./examples/menger_sponge/sponge.jpg) |
| path tracer | lasers | oblique slices |
| ![tracer](./examples/path_tracer/path_tracer.png) | ![lasers](./examples/laser/laser.png) | ![slices](./examples/slices/slices.png) |
4 changes: 2 additions & 2 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ impl Device {
self,
&vk::ImageCreateInfo::default()
.extent(vk::Extent3D {
width: dbg!(align_to(extent.width, 2)),
height: dbg!(align_to(extent.height, 2)),
width: align_to(extent.width, 2),
height: align_to(extent.height, 2),
depth: 1,
})
.image_type(vk::ImageType::TYPE_2D)
Expand Down

0 comments on commit 6a55407

Please sign in to comment.