mirror of
https://github.com/libretro/RetroArch
synced 2025-02-02 23:54:06 +00:00
420b7913d4
2820ab0b51 Merge pull request #1076 from KhronosGroup/bitcast-pre-330-glsl 63bcbd511e GLSL: Need extension to use bitcast on GLSL < 330. 9f3bebe3d0 Merge pull request #1075 from lifpan/master b11c20fc1d Remove unreasonable assertion for OpTypeImage Sampled parameter. 1a592b7c0f Merge pull request #1067 from cdavis5e/msl-scalar-block-layout 28454facbb MSL: Handle packed matrices. ea5c0ed82f MSL: Fix alignment of packed types. 44f688bf0b Merge pull request #1070 from KhronosGroup/fix-1066 25c74b324e Forget loop variable enables after emitting block chain. 6b010e0cbc Merge pull request #1069 from KhronosGroup/fix-1053 f6f849397e MSL: Re-roll array expressions in initializers. e5fa7edfd6 MSL: Support scalar block layout. git-subtree-dir: deps/SPIRV-Cross git-subtree-split: 2820ab0b51bf5e4187435d904b34e762b988f48b
66 lines
1.5 KiB
GLSL
66 lines
1.5 KiB
GLSL
cbuffer Block : register(b0)
|
|
{
|
|
column_major float2x3 _104_var[3][4] : packoffset(c0);
|
|
};
|
|
|
|
|
|
static float4 gl_Position;
|
|
static float4 a_position;
|
|
static float v_vtxResult;
|
|
|
|
struct SPIRV_Cross_Input
|
|
{
|
|
float4 a_position : TEXCOORD0;
|
|
};
|
|
|
|
struct SPIRV_Cross_Output
|
|
{
|
|
float v_vtxResult : TEXCOORD0;
|
|
float4 gl_Position : SV_Position;
|
|
};
|
|
|
|
float compare_float(float a, float b)
|
|
{
|
|
return float(abs(a - b) < 0.0500000007450580596923828125f);
|
|
}
|
|
|
|
float compare_vec3(float3 a, float3 b)
|
|
{
|
|
float param = a.x;
|
|
float param_1 = b.x;
|
|
float param_2 = a.y;
|
|
float param_3 = b.y;
|
|
float param_4 = a.z;
|
|
float param_5 = b.z;
|
|
return (compare_float(param, param_1) * compare_float(param_2, param_3)) * compare_float(param_4, param_5);
|
|
}
|
|
|
|
float compare_mat2x3(float2x3 a, float2x3 b)
|
|
{
|
|
float3 param = a[0];
|
|
float3 param_1 = b[0];
|
|
float3 param_2 = a[1];
|
|
float3 param_3 = b[1];
|
|
return compare_vec3(param, param_1) * compare_vec3(param_2, param_3);
|
|
}
|
|
|
|
void vert_main()
|
|
{
|
|
gl_Position = a_position;
|
|
float result = 1.0f;
|
|
float2x3 param = _104_var[0][0];
|
|
float2x3 param_1 = float2x3(float3(2.0f, 6.0f, -6.0f), float3(0.0f, 5.0f, 5.0f));
|
|
result *= compare_mat2x3(param, param_1);
|
|
v_vtxResult = result;
|
|
}
|
|
|
|
SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input)
|
|
{
|
|
a_position = stage_input.a_position;
|
|
vert_main();
|
|
SPIRV_Cross_Output stage_output;
|
|
stage_output.gl_Position = gl_Position;
|
|
stage_output.v_vtxResult = v_vtxResult;
|
|
return stage_output;
|
|
}
|