SPIRV-Cross/reference/opt/shaders/asm/frag/texture-sampling-fp16.asm.vk.frag.vk
2019-06-27 15:04:22 +02:00

21 lines
544 B
Plaintext

#version 450
#if defined(GL_AMD_gpu_shader_half_float)
#extension GL_AMD_gpu_shader_half_float : require
#elif defined(GL_EXT_shader_explicit_arithmetic_types_float16)
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
#else
#error No extension available for FP16.
#endif
#extension GL_EXT_shader_16bit_storage : require
layout(set = 0, binding = 0) uniform sampler2D uTexture;
layout(location = 0) out f16vec4 FragColor;
layout(location = 0) in f16vec2 UV;
void main()
{
FragColor = f16vec4(texture(uTexture, UV));
}