Commit graph

331 commits

Author SHA1 Message Date
Sascha Willems
dceb349849 Added cube map array sample 2020-07-19 07:07:54 +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
Sascha Willems
b0b299ee9c Removed last traces of old skeletal animation sample 2020-06-06 14:32:28 +02:00
Sascha Willems
fb022f3e05 Removed no-longer used model 2020-06-06 13:58:01 +02:00
Sascha Willems
df8f3b18f9 Moved glsl shaders 2020-06-05 21:27:17 +02:00
Sascha Willems
d4f7b3cc86 Merge branch 'master' into gltfskinning 2020-06-05 20:58:10 +02:00
Ben Clayton
3d49863bc7 Rename multisampling shaders: scene -> mesh
Possibly went unnoticed use to the rebase of the HLSL shaders and 10a1ecaf7.
2020-06-01 12:22:28 +01:00
Ben Clayton
8c35694de9 Add pre-built HLSL shaders
Mirrors those found in `data/shaders/glsl/`

Issue: #723
2020-06-01 12:22:28 +01:00
Ben Clayton
a4bbe18399 Have dxc generate hlsl shaders into hlsl directory
Instead of overwriting the glsl binaries.

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
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
8af406090e Remove the HLSL status table, everything now works 2020-05-21 16:29:48 +01: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
Ben Clayton
b6f2577174 Update HLSL skeletalanimation shaders with latest changes 2020-05-21 16:19:27 +01:00
Ben Clayton
7b12f89deb Apply ab38f8b1's changes to offscreen HLSL shaders 2020-05-21 16:19:27 +01:00
Ben Clayton
8cacf0b4e9 Add HLSL shaders for multisampling sample 2020-05-21 16:19:27 +01:00
Ben Clayton
e9ab033b5e Add HLSL shaders for glftscene sample 2020-05-21 16:07:54 +01:00
Ben Clayton
9c06c4eea7 Fix data/hlsl/README.md table header
The right most column header SHA was wrong.
2020-05-21 16:07:13 +01:00
Ben Clayton
cce75f1859 Add shaders re-implemented in HLSL
These were written against the shaders at revision eddd724e7.
There have been changes made since then, which will need to be mirrored.

See `data/hlsl/README.md` for the current status of each sample.
2020-05-21 12:58:13 +01:00
Sascha Willems
149ff8f94e Split sample into header and source files due to complexity 2020-05-15 07:13:51 +02:00
Sascha Willems
78a9b5bde1 Animation working
Code still wip and lacking comments
2020-05-14 21:40:54 +02:00
Sascha Willems
988df583c5 Started working on gltf skinned vertex animation sample
Will replace the old assimp based skeletal animation sample
2020-05-10 20:05:05 +02:00
Sascha Willems
10a1ecaf7b Re-Added missing shaders
Fixes #703
2020-04-29 18:39:15 +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
e0c15f62da Renamed mesh example to glTF scene 2020-04-19 11:50:46 +02:00
Sascha Willems
579c7d086f Calculate matrices from node-hierarchy and pass via push constant 2020-04-13 16:26:40 +02:00
Sascha Willems
bb9374b2ec Split shader UBOs 2020-04-12 21:58:45 +02:00
Sascha Willems
d1fbf8d00a
Skeletalanimation fix (#671)
* Fixed anc code cleanup for skeletal animation

Refs #669

* Fix android build
2020-02-20 14:25:29 +01:00
Sascha Willems
b3749a90ad
Merge pull request #653 from httpdigest/master
Fix typos
2020-02-14 07:00:18 +01:00
Jakub Kuderski
8982f8f2ec Perform sampling before branching to discard
This two fragment shaders that exhibit undefined behavior. In GLSL,
it is undefined to use implicit or explicit derivatives in
non-uniform control flow [1]. The SPIR-V produced by glslang contained
similar undefined behavior, which results in incorrect codegen
with the amdvlk's LLPC shader compiler, and produces visually
incorrect image.

This PR fixes this issue by hoisting the sampling so that it's
executed before discarding. It's a simple fix and may not be
the optimial way to resolve this issue.

[1]
https://www.khronos.org/registry/OpenGL/specs/gl/GLSLangSpec.4.60.pdf
p. 137.
2020-02-13 10:01:50 -05:00
Sascha Willems
fb45d1f741 Divide direction by w-component
Fixes #616
2020-01-24 10:04:31 +01:00
Sascha Willems
652fc3ab00 Code cleanup
Fixes #657
2020-01-24 09:16:52 +01:00
httpdigest
5029e15ec6 Fix typos
http://its-not-its.info/
2020-01-12 12:56:16 +01:00
Chris Forbes
6c4b8727ef Fix interface mismatch between VS and GS in deferredshadows
GLSLang determines the content of the builtin block based on the shading
language version. In the case of 420 vs 450, the difference is whether
the gl_CullDistance member is present.

Vulkan requires that the builtin interface block be the same on both
sides of a shader interface not involving the fragment shader, so this
leads to undefined behavior. This is caught by recent versions of the
validation layers.

Fix the issue by using GLSL 450 for both shaders in the pipeline.
2020-01-07 18:27:13 -08:00
binary
6849c14ee4
Update ssao.frag
Sorry,It should be spelled bias
2019-12-03 19:06:56 +08:00
binary
364c4695a9
Update ssao.frag
samplePos.z bias  can remove banding
2019-11-25 10:13:19 +08:00
Sascha Willems
e1e348ac7a Merge branch 'master' of github.com:SaschaWillems/Vulkan 2019-10-27 17:53:51 +01:00
Sascha Willems
526ed2da0e Simplified offscreen sample 2019-10-27 17:53:31 +01:00
Sascha Willems
eddd724e7c Removed unused compute shader ubo members 2019-10-23 20:45:54 +02:00
Sascha Willems
958f0cb65e
Merge pull request #609 from chrisforbes/shader-recompile
Recompile shaders with more modern glslang
2019-10-10 21:19:30 +02:00
Sascha Willems
36bf3dd31a Removed remaining dds files
All textures are now loaded from ktx
2019-09-06 19:18:15 +02:00
Chris Forbes
a05d90c221 Recompile shaders with more modern glslang
The SPIRV previously checked in had various issues -- most commonly, it
would use the VertexId and InstanceId builtins rather than the
replacmenet VertexIndex and InstanceIndex builtins required by Vulkan.
2019-09-06 09:59:45 +01:00
Sascha Willems
2a5d7df56e
Merge pull request #585 from tntljc/master
Fix some synchronization flaws
2019-06-22 10:00:09 +02:00
JC Liang
b575a1ff1a Fix some synchronization flaws
- shader: add barrier at the end of each iteration to avoid writing before the reading finished
- cpp: add synchronization between compute and graphics, the image barrier is not enough for the data visibility between different submission

	modified:   data/shaders/computenbody/particle_calculate.comp
	modified:   data/shaders/computenbody/particle_calculate.comp.spv
	modified:   examples/computenbody/computenbody.cpp
2019-06-17 19:31:00 +08:00
Sascha Willems
10a908d20f Started work on descriptor indexing example
Refs #583
2019-06-10 13:07:48 +02:00
Sascha Willems
b2add91d2c Renamed compute shader ray tracing example 2019-05-11 12:41:46 +02:00