Commit graph

315 commits

Author SHA1 Message Date
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
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
Sascha Willems
4b71da8049 Removed unused shader payload 2019-04-27 13:00:12 +02:00
Sascha Willems
8fdabb0019 Added VK_NV_ray_tracing reflections example 2019-04-27 11:05:29 +02:00
Sascha Willems
a1b21f6990 Added VK_NV_ray_tracing shadow casting example 2019-04-22 18:49:38 +02:00
Sascha Willems
85a13ec645 Color triangle using barycentric coordinates 2019-04-21 15:39:28 +02:00
Sascha Willems
b8b3fac9b4 Added basic VK_NV_ray_tracing example (wip) 2019-04-20 17:54:17 +02:00
Sascha Willems
bfdf821d31 Much improved cube map visualization
Now displays all six cube map faces as a single cross
2019-04-15 21:30:57 +02:00
Sascha Willems
a3c2f42859 Reworked texture array sample, code cleanup. refactoring 2019-04-13 13:38:17 +02:00
Sascha Willems
cd3ef3e713 Enabled shader clip distance feature (validation)
Regenerated shaders with current glslang compiler
2019-04-01 20:45:42 +02:00
Sascha Willems
8afe8d825d Cleanup, code comments 2019-03-29 08:07:20 +01:00
Sascha Willems
358ab9d550 Added new sample to demonstrate negative viewport height via VK_KHR_MAINTENANCE1
Refs #563
2019-03-28 23:51:50 +01:00
Gary Sweet
7632def9d6 Fix sample count limits in deferredmultisampling
The sample count was previously fixed at 8, which is not supported
on some platforms. The code now checks for the maximum supported
sample count and uses that instead.

If you would prefer the upper limit to be fixed at 8, that is
obviously trivial to change.
2019-03-06 12:58:28 +00:00
Sascha Willems
cf83c1b499 Nicer font for ImGui overlay 2019-02-20 20:57:38 +01:00
Sascha Willems
eec6444e3d Rebuild shaders with recent glslang compiler
Refs #544
2019-02-20 20:52:12 +01:00
Sascha Willems
047f9faeec Fixed image usage (validation), code cleanup
Moved model to asset pack
2019-02-20 20:03:12 +01:00
Sascha Willems
49ee3469b6 Merge branch 'master' of github.com:SaschaWillems/Vulkan 2019-01-31 20:10:04 +01:00
Sascha Willems
fbbfe62ff4 Updated shadow mapping SPIR-V shaders 2019-01-31 20:09:48 +01:00