procedural-3d-engine/data/shaders
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
..
base Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
bloom Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computecloth Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computecullandlod Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computeheadless Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computenbody Removed unused compute shader ubo members 2019-10-23 20:45:54 +02:00
computeparticles Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computeraytracing Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
computeshader Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
conditionalrender Updated shaders, UI 2018-09-04 21:18:14 +02:00
conservativeraster Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
debugmarker Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
deferred Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
deferredmultisampling Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
deferredshadows Fix interface mismatch between VS and GS in deferredshadows 2020-01-07 18:27:13 -08:00
descriptorindexing Started work on descriptor indexing example 2019-06-10 13:07:48 +02:00
descriptorsets Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
displacement Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
distancefieldfonts Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
dynamicuniformbuffer Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
gears Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
geometryshader Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
hdr Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
imgui Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
indirectdraw Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
inlineuniformblocks Reworked inline uniform block example 2018-10-07 10:27:28 +02:00
inputattachments Different scene, toon shading and separate parameters for color input attachment 2018-07-19 11:01:15 +02:00
instancing Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
mesh Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
multithreading Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
multiview Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
negativeviewportheight Cleanup, code comments 2019-03-29 08:07:20 +01:00
nv_ray_tracing_basic Divide direction by w-component 2020-01-24 10:04:31 +01:00
nv_ray_tracing_reflections Divide direction by w-component 2020-01-24 10:04:31 +01:00
nv_ray_tracing_shadows Divide direction by w-component 2020-01-24 10:04:31 +01:00
occlusionquery Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
offscreen Simplified offscreen sample 2019-10-27 17:53:31 +01:00
parallaxmapping Perform sampling before branching to discard 2020-02-13 10:01:50 -05:00
particlefire Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pbrbasic Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pbribl Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pbrtexture Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pipelines Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pipelinestatistics Removed gl_PerVertex overrides 2018-10-20 18:00:32 +02:00
pushconstants Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
pushdescriptors Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
radialblur Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
renderheadless Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
scenerendering Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
screenshot Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
shadowmapomni Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
shadowmapping Code cleanup 2020-01-24 09:16:52 +01:00
shadowmappingcascade Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
skeletalanimation Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
specializationconstants Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
sphericalenvmapping Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
ssao Update ssao.frag 2019-12-03 19:06:56 +08:00
stencilbuffer Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
subpasses Perform sampling before branching to discard 2020-02-13 10:01:50 -05:00
terraintessellation Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
tessellation Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
textoverlay Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
texture Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
texture3d Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
texturearray Reworked texture array sample, code cleanup. refactoring 2019-04-13 13:38:17 +02:00
texturecubemap Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
texturemipmapgen Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
texturesparseresidency Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
triangle Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
viewportarray Removed gl_PerVertex overrides 2018-10-20 18:00:32 +02:00
vulkanscene Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
compileshaders.py Fix capitalization of glslangValidator 2018-03-07 14:56:56 +01:00