Commit graph

328 commits

Author SHA1 Message Date
Sascha Willems
feb939096f
Merge glTF branch (#747)
* Added helper function for easy pipeline vertex input state create info structure setup from glTF model vertex class

* Split glTF loader into header and implementation

* Updated sample to use glTF

* Removed collada files

Replaced assets are now part of the asset pack

* Return value for glTF model vertex input state create info helper

* Removed unused assets

* Use glTF assets

* Added default material for glTF node's without materials

* Use glTF assets

* Apply pre-transforms to normals

* Use glTF assets

* Use glTF assets

* Use vertex input state from glTF model class

* Scene setup

* Use glTF assets

* Use glTF assets

* Display error message and exit if glTF file could not be loaded

* Use glTF assets

* Use glTF assets

* Use glTF assets

* Remove unused buffer binds

* Use glTF assets

* Remove no longer used model files

* Remove no longer used model files

* Added support for rendering glTF models with images

* glTF model normal pre-transform ignores translation

* Use glTF assets

* Use glTF assets

* Use glTF assets

* Use glTF assets

* Use glTF assets

* Only add combined image samplers to pool if actually used in the scene

* Use global descriptor set layouts

* Use global descriptor set layouts

* Use glTF assets

* Use glTF assets

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders

* Use glTF assets

Code cleanup

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders

* Remove no-longer used model

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders
Removed no-longer used model

* Use glTF assets

Code cleanup
Use RGBA texture instead of different compressed formats
Removed no-longer used assets

* Adnrdoid build file

* Use glTF assets

Code cleanup and refactoring
Updated GLSL and HLSL shaders

* Added vertex count and way of passing additional memory property type flags to glTF loader

* Use glTF assets

Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Updated GLSL and HLSL shaders

* Remove unfinished sample

* Completely reworked push constants sample

Use glTF assets
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Android CMake build files

* Removed un-used asset

* Explicit buffer binding function

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders

* Use glTF assets

Code cleanup

* Use glTF assets

Code cleanup
Removed no-longer used assets

* Use glTF assets

Code cleanup
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Remove no-longer used asset

* Use glTF assets

Code cleanup and refactoring
Performance optimizations
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Code cleanup and refactoring
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Code cleanup and refactoring
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Code cleanup and refactoring
Removed no-longer used assets

* Use glTF assets

Code cleanup and refactoring
Removed no-longer used assets

* Use glTF assets

Code cleanup and refactoring

* Use glTF assets

Code cleanup and refactoring

* Use glTF assets

Code cleanup and refactoring
Removed no-longer used assets

* Pass vertex size and calculate multiplier in shaders instead of hard-coding

With this, changes to the glTF vertex structure won't break the ray tracing samples

* Load tangents (if present)

* Use glTF assets

Code cleanup and heavy refactoring
Reworked debug display code

* Android build

* Normal mapping fixes

Udpated HLSL shaders

* Use glTF assets

Code cleanup and heavy refactoring
Reworked debug display code
Updated GLSL and HLSL shaders

* Code cleanup, comments

* Use glTF assets

Code cleanup and heavy refactoring
Reworked debug display code
Updated GLSL and HLSL shaders

* Added sample count to framebuffer create info

* Removed no-longer used assets

* Android build

Removed no-longer used assets

* Code cleanup and heavy refactoring

Updated GLSL and HLSL shaders
Use tangents stored in GLSL instead of calculating them in the fragment shader

* Renamed textured PBR sample main cpp file

* Use glTF assets

Code cleanup and refactoring
Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Removed no-longer used assets

* Android build files

* Android build files

* Use glTF assets

Removed no-longer used assets

* Fixed HLSL shaders

* Android build files

* Use glTF assets

Updated GLSL and HLSL shaders
Removed no-longer used assets

* Use glTF assets

Updated GLSL and HLSL shaders
Removed no-longer used assets

* Added flag to disable glTF image loading

Useful for samples that use their own textures or don't use textures at all to speed up loading

* Use glTF assets

Code cleanup
Use Sponza scene instead of Sibenik to better highlight the effect
Updated GLSL and HLSL shaders

* Updated Android build files

* Removed left-over comment

* Use Sponza scene for the SSAO sample

* Removed unused code

* Removed ASSIMP

No longer required as all samples now use the glTF file format

* Added missing vertex shader stage

* Removed old ASSIMP-based model loader

* Added support for loading external glTF images from ktx

Android fixes for loading external buffer files

* Scene setup

* Added missing shader stages

* Removed ASSIMP from build files

* Fixed compiler warning

* Removed ASSIMP from readmes

* Android build files cleanup

* Replaced ktx submodule with only the files required for this repo

The ktx submodule was a tad too big and contained lots of files not required for this repo

* Moved ktx build files into base project

* Use glTF assets

* Use glTF assets

* Removed license files, will be moved to asset pack

* Use RGBA textures

* Use RGBA cubemp texture with face assignment based on original images

Refs #679

* Android build files

* Removed textures

All textures will be moved to the asset pack

* Ignore asset folders

* Removed font

Fonts will be moved to the asset pack

* Link to gltf asset pack

* Updated gitignore

* Android build file
2020-07-28 20:20:38 +02:00
Sascha Willems
8526c204e7 Minor code cleanup, better naming and comments 2020-07-19 12:13:42 +02:00
Sascha Willems
8ed41c6ae8 Removed compiler warnings 2020-07-19 11:53:10 +02:00
Sascha Willems
7805b8bbe0 Comment on how cube map arrays are stored in ktx, loop structure 2020-07-19 09:58:16 +02:00
Sascha Willems
dceb349849 Added cube map array sample 2020-07-19 07:07:54 +02:00
Sascha Willems
f49c3d9ede
Merge pull request #737 from manueme/fix/vulkanscene
Fix offset for texture coordinates - vulkanscene example
2020-07-15 06:56:26 +02:00
Sascha Willems
3d347adf30
Merge pull request #741 from Jarreddebeer/yoffset_distancefieldfont
correction to yoffset char positions in distance field fonts example
2020-07-15 06:55:17 +02:00
Sascha Willems
3b117fd2dc Split into header and implementation 2020-07-14 20:17:48 +02:00
Sascha Willems
77322190ea Zero memory with initializer
Fies #745
2020-07-14 18:42:40 +02:00
Sascha Willems
447688980e Store mip tail info in virtual texture class 2020-07-14 07:51:07 +02:00
Sascha Willems
187606a2ea Properly fill virtual page's mip level 2020-07-11 21:23:05 +02:00
Sascha Willems
b67bfa6f88 Fill mip tail 2020-07-11 19:22:19 +02:00
Sascha Willems
62070aa9f4 Reworking sparse image residency sample
Was broken with recent drivers
2020-07-11 13:01:02 +02:00
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
Jarred de Beer
79b89e5cc0 correction to yoffset char positions in distance field fonts example 2020-06-29 20:59:38 +02:00
Sascha Willems
889125c377
Merge pull request #740 from infapi00/apinheiro/shadowmapping-check-depth-format-supports-linear-filtering
shadowmappping: check if depth format supports LINEAR filtering
2020-06-24 20:42:10 +02:00
Sascha Willems
968ccc0df4
Merge pull request #726 from FrickHazard/patch-1
Minor comment change
2020-06-24 20:40:21 +02:00
Sascha Willems
cbf50a9ef3
Merge pull request #702 from iostrowsINTEL/deferred-fix
Deferred*: Fix incorrect command pool in deinitialization
2020-06-24 20:35:04 +02:00
Sascha Willems
99c9e8e4ee Removed superfluous call to vkCmdSetViewport
Fixes #739
2020-06-24 20:07:04 +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
Manuel Machado
599d2aaf04 Fix offset for texture coordinates - vulkanscene example 2020-06-15 00:11:48 -03:00
Dejan Trajkovic
94a4a2bb32 Correct shadersPath for renderheadless project 2020-06-09 06:33:38 +02:00
Dejan Trajkovic
c201670b0e Correct shadersPath for computeheadless project 2020-06-07 17:26:11 +02:00
Sascha Willems
3b345005e5 Add example header files to project (if present) 2020-06-06 14:42:53 +02:00
Sascha Willems
b0b299ee9c Removed last traces of old skeletal animation sample 2020-06-06 14:32:28 +02:00
Sascha Willems
aa1768b315 Finished glTF skinning readme/tutorial 2020-06-06 13:31:04 +02:00
Sascha Willems
d03595ab5b Code cleanup 2020-06-06 13:02:40 +02:00
Sascha Willems
1158cb2232 Code cleanup and simplification 2020-06-06 12:44:55 +02:00
Sascha Willems
b13ed52213 Comments 2020-06-06 12:01:07 +02:00
Sascha Willems
ffc3068c9d Resource cleanup 2020-06-06 11:21:55 +02:00
Sascha Willems
9e96aeaa5f clang format 2020-06-06 11:05:56 +02:00
Sascha Willems
a1afaf3de5 Code cleanup 2020-06-06 11:00:38 +02:00
Sascha Willems
6eb0273c76 Code cleanup 2020-06-06 10:20:30 +02:00
Sascha Willems
225106860a Moved glsl shaders 2020-06-05 21:28:47 +02:00
Sascha Willems
df8f3b18f9 Moved glsl shaders 2020-06-05 21:27:17 +02:00
Sascha Willems
ff63db5947 Merge branch 'master' into gltfskinning 2020-06-05 21:24:01 +02:00
Sascha Willems
79f7b28846 Remove unused image sampler
Fixes #713
2020-06-05 21:23:02 +02:00
Sascha Willems
ec8d9698e9 Add HLSL shaders to project file
GLSL and HLSL shaders get their own folders per sample in the project structure
2020-06-05 21:11:28 +02:00
Sascha Willems
d4f7b3cc86 Merge branch 'master' into gltfskinning 2020-06-05 20:58:10 +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
Ender Doe
831442eb18
Update computeshader.cpp 2020-05-30 10:40:46 -04:00
Sascha Willems
ec023cf581 Started working on small glTF skinning example tutorial/readme 2020-05-26 08:13:47 +02:00
Sascha Willems
7e8e667fb3 Code cleanup, shader renaming 2020-05-23 20:38:40 +02:00
Sascha Willems
3e59ce8d57 Code cleanup, shader renaming 2020-05-23 20:38:28 +02:00
Sascha Willems
85106a6bb2 Merge branch 'master' into gltfskinning 2020-05-23 19:54:58 +02:00
Ben Clayton
0da96cfc63 Add missing push constant to fix HLSL computeparticles 2020-05-21 16:29:48 +01:00
Ben Clayton
e3234db041 Add inverseModelView UBO to fix texturecubemap sample 2020-05-21 16:29:47 +01:00
Ben Clayton
13c081664e Add missing inverseModelView UBO to fix hdr sample 2020-05-21 16:29:19 +01:00
Sascha Willems
451c895525 Code cleanup 2020-05-15 07:22:01 +02:00