yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
118ac898
vulkan-sdk-1.4.357.0
1#version 450 2#extension GL_NV_compute_shader_derivatives : require 3 4layout ( local_size_x = 2 , local_size_y = 4 ) in ; 5 6/* 7* GLSL_NV_compute_shader_derivatives says about derivative_group_quadsNV 8* and derivative_group_linearNV that: 9* If neither layout qualifier is specified, derivatives in compute shaders 10* return zero, which is consistent with the handling of built-in texture 11* functions like texture() in GLSL 4.50 compute shaders. 12*/ 13 14layout ( set = 0 , binding = 1 ) buffer block { 15float fDerivativeX ; 16float fDerivativeY ; 17 18float fX ; 19float fY ; 20} ; 21 22void main (){ 23fDerivativeX = dFdx ( fX ) ; 24fDerivativeY = dFdy ( fY ) ; 25}