Commit graph

520 commits

Author SHA1 Message Date
Sascha Willems
e370e6d169
Merge glTF scene rendering sample (#744)
* Started reworking the scene rendering to sample
Use glTF instead of ASSIMP, per-material pipelines, material loading, etc.

* Visibility toggle for scene nodes

* Fixed lighting, updated GLSL and HLSL shaders

* Renamed sample

* Code-Cleanup, comments, validation fixes

* Android build

* Started on tutorial for glTF scene rendering sample

* Minor code cleanup

* Adding new chapters to the tutorial for glTF scene rendering sample

* Added info on normal map shader bindings, spelling

* Added drawing chapter

* Getter for texture descriptors

Makes code a easier to read

* Renamed glTF scene sample

* Add markdown files to projects

* Updated readme, separate chapter for glTF samples

* Comments

* Removed unused screenshot
2020-07-04 14:20:45 +02:00
Alejandro Piñeiro
d33bc6c75e shadowmappping: check if depth format supports LINEAR filtering
The test uses the format VK_FORMAT_D16_UNORM for the shadow map, and
it sets unconditionally VK_FILTER_LINEAR when using it.

But by spec, it is not mandatory that format to support
filtering. Explained here:

https://www.khronos.org/registry/vulkan/specs/1.2/html/chap32.html

table 51, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT.

This commit checks if that flag is present with that format to decide
between LINEAR (the default value) or NEAREST (if LINEAR is not
supported). Adds a auxiliar method on VulkanTools just in case it
could be useful for other demos.

This is not detected by the Validation Layers, but raise an assertion
with one of the development tools we use to implement the Mesa v3dv
driver (rpi4 vulkan driver).
2020-06-20 00:08:13 +02:00
Ben Clayton
301e8abf12 Add command flag for picking between shaders
The new `-s`, `--shaders` command line flag allows you to specify whether you want to load the glsl or hlsl shaders.
Defaults to glsl.

Issue: #723
2020-06-01 12:22:28 +01:00
Ben Clayton
ca884587a4 Move shaders into glsl and hlsl directories
Move `data/shaders` to `data/shaders/glsl`
Move `data/hlsl` to `data/shaders/hlsl`

Fix up shader paths in the cpp files to point to the new glsl location.

`data/shaders/hlsl/compile.py` still overwrites the glsl .spv files (for
now).

Issue: #723
2020-06-01 12:22:28 +01:00
Sascha Willems
f5dbf162a7 Added helper function to get vertex input attribute descriptions from requested vertexattributes as a vector
That vector can directly be used for a pipeline's vertex attribute setup
2020-04-25 17:09:31 +02:00
Sascha Willems
2b28a60e17 Added flag to flip vertex position y coordinates 2020-04-25 12:28:16 +02:00
Sascha Willems
7b46e71f33 Added flag to flip vertex position y coordinates 2020-04-25 12:01:21 +02:00
Sascha Willems
5df36d7b19 Added flag to pre-multiply vertex colors by material base color 2020-04-25 10:50:24 +02:00
Sascha Willems
107aa35b9e Extracted vertex into separate class with easy component to Vulkan vertex attribute mappings
Load vertex colors if present
Added flag to pre-transform vertices
2020-04-25 08:23:32 +02:00
Sascha Willems
ab38f8b150 Code-Cleanup: All samples now use the camera class and it's matrices
Cleaned up base class
2020-04-22 20:58:24 +02:00
Sascha Willems
53846d8b1d Code cleanup 2020-04-20 22:13:51 +02:00
Sascha Willems
4b9f10d644 Code cleanup 2020-04-20 21:39:30 +02:00
Sascha Willems
458c149c71 Code cleanup 2020-04-20 20:29:15 +02:00
Sascha Willems
4e610c56ce Also apply vertical flip option on aspect ratio change 2020-04-19 16:42:38 +02:00
Sascha Willems
0ca5f41308 Added missing include 2020-04-19 10:11:50 +02:00
Sascha Willems
cbe751d26e Base class cleanup and restructuring 2020-04-19 10:05:47 +02:00
Sascha Willems
bb8d4c6df1 Add default frame submission function to base class 2020-04-19 09:17:53 +02:00
Sascha Willems
6c43ab37ff Added property to flip y-axis to camera class 2020-04-13 16:04:59 +02:00
Sascha Willems
78b25ebd71
Merge pull request #681 from krOoze/triangle_dependencies
Tweak Triangle subpass dependencies
2020-04-01 18:15:30 +02:00
Sascha Willems
a8a3eb01ab Fix scope for VkPhysicalDeviceFeatures2
Fixes #678
2020-03-31 08:21:28 +02:00
Petr Kraus
2a986b6a87 Fix some whitespace 2020-03-05 21:20:42 +01:00
Sascha Willems
fff003315b Added overload for passing command pool to cmd buffer create and flush 2020-02-22 11:35:07 +01:00
Sascha Willems
fcb0a2a46a Load UI overla font from asset path
Refs #627
2020-02-17 21:09:43 +01:00
Sascha Willems
662d2b3464 Centralize asset path handling
Refs #470
Refs #627
2020-02-17 21:09:27 +01:00
Sascha Willems
b3749a90ad
Merge pull request #653 from httpdigest/master
Fix typos
2020-02-14 07:00:18 +01:00
Gary Sweet
bdc3b44e7d Clamp miplevel size to avoid zero width or height
I was seeing a zero height in certain circumstances
for textures in scenerendering.
2020-02-07 09:15:13 +00:00
Sascha Willems
db1d12d77f Force minimum window size on Windows
Fixes #579
2020-01-24 09:52:26 +01:00
Sascha Willems
ed3d771ce4 Removed unused usage flags on depth stencil image
Fixes #492
2020-01-24 09:39:44 +01:00
httpdigest
5029e15ec6 Fix typos
http://its-not-its.info/
2020-01-12 12:56:16 +01:00
Robin Liu
5a6170e1e9 Fix the validation error for buffer copy 2020-01-07 17:23:50 -05:00
Sascha Willems
e30279fae5 Remove unnecessary assignment
Fixes #648
2020-01-06 20:07:09 +01:00
Sascha Willems
3537d2cca2 Merge branch 'master' into libktx
# Conflicts:
#	examples/texturemipmapgen/texturemipmapgen.cpp
2019-12-07 16:04:45 +01:00
Sascha Willems
99fa99ff37 Added function for getting best-fit depth format to device
Refs #607
2019-12-01 18:13:22 +01:00
Sascha Willems
39852c4a27 Use proper buffer sizes 2019-11-19 18:02:49 +01:00
Sascha Willems
27ab72d73f Merge branch 'master' into libktx 2019-10-27 16:38:52 +01:00
Sascha Willems
b3214c521b Use VK_EXT_debug_utils instead of deprecated VK_EXT_debug_report for debugging 2019-10-18 20:51:46 +02:00
Sascha Willems
10129ee606 Uee new VK_LAYER_KHRONOS_validation layer on all platforms
Check if validation layer is actually present
2019-10-18 20:48:50 +02:00
Sascha Willems
01bf10f9a8 Uee new VK_LAYER_KHRONOS_validation layer on all platforms
Check if validation layer is actually present
2019-10-18 20:28:54 +02:00
Sascha Willems
a5794633f0 Get image offsets outside of assert calls 2019-09-13 22:05:57 +02:00
Sascha Willems
2b8b23acf9 Get image offsets outside of assert calls 2019-09-13 22:02:46 +02:00
Sascha Willems
d33fc23e0b Merge branch 'master' into libktx 2019-09-06 19:20:35 +02:00
Sascha Willems
2f985f2aae Fixed some compiler warnings 2019-08-18 18:33:16 +02:00
Sascha Willems
b67c35299b Android asset loading 2019-08-03 18:20:27 +02:00
Sascha Willems
85f0e9f6b7 Replaced gli with libktx for terrain tessellation height map loading 2019-08-03 10:39:39 +02:00
Sascha Willems
0eef7f2ee1 Removed unused gli includes 2019-08-03 10:15:55 +02:00
Sascha Willems
87042dc358 Replaced gli with libktx for 2D texture loading sample 2019-08-03 09:46:41 +02:00
Sascha Willems
1a6042e82d Started replacing gli with libktx 2019-08-02 20:41:44 +02:00
Sascha Willems
4318c6d43e Added new functionality for passing extension structures to device creation 2019-06-10 08:46:11 +02:00
Sascha Willems
eb39c1b8ac Removed deprecated function
Refs #576
2019-05-05 14:18:35 +02:00
Sascha Willems
00982b70bb Added option for passing additional vertex/index buffer memory usage flags for loading models
Removed unused optional assimp flags
2019-04-23 08:15:23 +02:00