* 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
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
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.
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.
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.
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.
- 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