https://github.com/shader-slang/slang
Raw File
Tip revision: 6308a1224672944220a1fee34ae22f70212703a0 authored by Tim Foley on 25 February 2020, 16:12:16 UTC
Fix a crash when a generic value argument isn't constant (#1241)
Tip revision: 6308a12
sincos.slang
// sincos.slang
//TEST:SIMPLE:

// Just confirming that calls to the `sincos()` built
// in work in the front-end.

float test( float4x4 m, float4 v, float a )
{
    float4x4 mc, ms;
    sincos(m, mc, ms);

    float4 vc, vs;
    sincos(v, vc, vs);

    float c, s;
    sincos(a, c, s);
	
	return c + s + vc[0] + vs[0] + mc[0][0] + ms[0][0];
}
back to top