You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Sascha,
i am working on a rendering engine with vulkan and i have a really silly question :D
So far so good i can render unlimited objects with textures and lighting also works (forward rendering with blending pipelines).
But i need the Depth-Test to be calculated before the fragment shader executes and i dont know how i can specify this in the shader. I dont understand what the Vulkan Documentation means:
An explicit control is provided to allow fragment shaders to enable early fragment tests. If the fragment shader specifies the EarlyFragmentTests OpExecutionMode, the per-fragment tests described in Early Fragment Test Mode are performed prior to fragment shader execution. Otherwise, they are performed after fragment shader execution.
So how i specify "EarlyFragmentTests OpExecutionMode"? Thanks in advance :) (and thanks for your awesome code samples!)
The text was updated successfully, but these errors were encountered:
I haven't yet used early fragment tests in Vulkan, but they should be enabled the same way as with OpenGL (see here).
The "OpExecutionMode" refers to SPIR-V. To enable this, put this in your GLSL shader:
layout(early_fragment_tests) in;
This will enable the SPIR-V exection mode:
P.S. : Can you please use the official Khronos forums for Vulkan or stakoverflow for asking Vulkan related questions instead of the issue tracker? I'm active on both 😉
Hello Sascha,
i am working on a rendering engine with vulkan and i have a really silly question :D
So far so good i can render unlimited objects with textures and lighting also works (forward rendering with blending pipelines).
But i need the Depth-Test to be calculated before the fragment shader executes and i dont know how i can specify this in the shader. I dont understand what the Vulkan Documentation means:
An explicit control is provided to allow fragment shaders to enable early fragment tests. If the fragment shader specifies the EarlyFragmentTests OpExecutionMode, the per-fragment tests described in Early Fragment Test Mode are performed prior to fragment shader execution. Otherwise, they are performed after fragment shader execution.
So how i specify "EarlyFragmentTests OpExecutionMode"? Thanks in advance :) (and thanks for your awesome code samples!)
The text was updated successfully, but these errors were encountered: