yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeFull address insts elimination for backward autodiff. (#2604)46a4d98ba

master
394 B29 linesraw
1// precise-keyword.slang.glsl
2//TEST_IGNORE_FILE:
3
4#version 450
5
6layout(location = 0)
7out vec4 _S1;
8
9layout(location = 0)
10in vec2 _S2;
11
12void main()
13{
14    float _S3 = _S2.x;
15
16    precise float z_0;
17
18    if(_S3 > 0.00000000000000000000)
19    {
20        z_0 = _S3 * _S2.y + _S3;
21    }
22    else
23    {
24        float _S4 = _S2.y;
25        z_0 = _S4 * _S3 + _S4;
26    }
27    _S1 = vec4(z_0);
28    return;
29}