procedural-3d-engine/data/shaders/subpasses
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
..
composition.frag Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
composition.frag.spv Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
composition.vert Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
composition.vert.spv Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
gbuffer.frag Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
gbuffer.frag.spv Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
gbuffer.vert Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
gbuffer.vert.spv Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00
transparent.frag Perform sampling before branching to discard 2020-02-13 10:01:50 -05:00
transparent.frag.spv Perform sampling before branching to discard 2020-02-13 10:01:50 -05:00
transparent.vert Removed GL_ARB_separate_shader_objects and GL_ARB_shading_language_420pack extensions from all shaders 2018-11-19 22:05:47 +01:00
transparent.vert.spv Recompile shaders with more modern glslang 2019-09-06 09:59:45 +01:00