mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 23:54:06 +00:00
5af5222249
- https://github.com/KhronosGroup/SPIRV-Cross/commit/ 66a407285e36a0f772e3209cb86ded6e3d900f6a
24 lines
1.4 KiB
Plaintext
24 lines
1.4 KiB
Plaintext
#version 310 es
|
|
layout(local_size_x = 8, local_size_y = 8, local_size_z = 1) in;
|
|
|
|
layout(binding = 4, std140) uniform UBO
|
|
{
|
|
vec4 uInvSize;
|
|
vec4 uScale;
|
|
} _46;
|
|
|
|
layout(binding = 0) uniform mediump sampler2D uHeight;
|
|
layout(binding = 1) uniform mediump sampler2D uDisplacement;
|
|
layout(binding = 2, rgba16f) uniform writeonly mediump image2D iHeightDisplacement;
|
|
layout(binding = 3, rgba16f) uniform writeonly mediump image2D iGradJacobian;
|
|
|
|
void main()
|
|
{
|
|
vec4 _59 = (vec2(gl_GlobalInvocationID.xy) * _46.uInvSize.xy).xyxy + (_46.uInvSize * 0.5);
|
|
vec2 _157 = ((textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(1, 0)).xy - textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(-1, 0)).xy) * 0.60000002384185791015625) * _46.uScale.z;
|
|
vec2 _161 = ((textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(0, 1)).xy - textureLodOffset(uDisplacement, _59.zw, 0.0, ivec2(0, -1)).xy) * 0.60000002384185791015625) * _46.uScale.z;
|
|
imageStore(iHeightDisplacement, ivec2(gl_GlobalInvocationID.xy), vec4(textureLod(uHeight, _59.xy, 0.0).x, 0.0, 0.0, 0.0));
|
|
imageStore(iGradJacobian, ivec2(gl_GlobalInvocationID.xy), vec4((_46.uScale.xy * 0.5) * vec2(textureLodOffset(uHeight, _59.xy, 0.0, ivec2(1, 0)).x - textureLodOffset(uHeight, _59.xy, 0.0, ivec2(-1, 0)).x, textureLodOffset(uHeight, _59.xy, 0.0, ivec2(0, 1)).x - textureLodOffset(uHeight, _59.xy, 0.0, ivec2(0, -1)).x), ((1.0 + _157.x) * (1.0 + _161.y)) - (_157.y * _161.x), 0.0));
|
|
}
|
|
|