• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#version 450 core
2
3#extension GL_EXT_spirv_intrinsics: enable
4
5spirv_instruction (set = "GLSL.std.450", id = 35) // modf
6float modf(float x, spirv_by_reference float i);
7
8layout(location = 0) in float floatIn;
9layout(location = 0) out vec2 vec2Out;
10layout(location = 1) out float floatOut;
11
12void func(spirv_by_reference float f)
13{
14    f = 0.5;
15}
16
17void main()
18{
19    vec2Out.x = modf(floatIn, vec2Out.y);
20    func(floatOut);
21}
22