diff --git a/reference/shaders-hlsl/frag/basic-color-3comp.sm30.frag b/reference/shaders-hlsl/frag/basic-color-3comp.sm30.frag new file mode 100644 index 00000000..d3697d65 --- /dev/null +++ b/reference/shaders-hlsl/frag/basic-color-3comp.sm30.frag @@ -0,0 +1,26 @@ +static float3 FragColor; +static float4 vColor; + +struct SPIRV_Cross_Input +{ + float4 vColor : TEXCOORD0; +}; + +struct SPIRV_Cross_Output +{ + float4 FragColor : COLOR0; +}; + +void frag_main() +{ + FragColor = vColor.xyz; +} + +SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) +{ + vColor = stage_input.vColor; + frag_main(); + SPIRV_Cross_Output stage_output; + stage_output.FragColor = float4(FragColor, 0.0); + return stage_output; +} diff --git a/reference/shaders-hlsl/frag/basic-color-3comp.sm50.frag b/reference/shaders-hlsl/frag/basic-color-3comp.sm50.frag new file mode 100644 index 00000000..52f6fed6 --- /dev/null +++ b/reference/shaders-hlsl/frag/basic-color-3comp.sm50.frag @@ -0,0 +1,26 @@ +static float3 FragColor; +static float4 vColor; + +struct SPIRV_Cross_Input +{ + float4 vColor : TEXCOORD0; +}; + +struct SPIRV_Cross_Output +{ + float3 FragColor : SV_Target0; +}; + +void frag_main() +{ + FragColor = vColor.xyz; +} + +SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) +{ + vColor = stage_input.vColor; + frag_main(); + SPIRV_Cross_Output stage_output; + stage_output.FragColor = FragColor; + return stage_output; +} diff --git a/shaders-hlsl/frag/basic-color-3comp.sm30.frag b/shaders-hlsl/frag/basic-color-3comp.sm30.frag new file mode 100644 index 00000000..64211b65 --- /dev/null +++ b/shaders-hlsl/frag/basic-color-3comp.sm30.frag @@ -0,0 +1,11 @@ +#version 310 es +precision mediump float; + +layout(location = 0) in vec4 vColor; +layout(location = 0) out vec3 FragColor; + +void main() +{ + FragColor = vColor.xyz; +} + diff --git a/shaders-hlsl/frag/basic-color-3comp.sm50.frag b/shaders-hlsl/frag/basic-color-3comp.sm50.frag new file mode 100644 index 00000000..64211b65 --- /dev/null +++ b/shaders-hlsl/frag/basic-color-3comp.sm50.frag @@ -0,0 +1,11 @@ +#version 310 es +precision mediump float; + +layout(location = 0) in vec4 vColor; +layout(location = 0) out vec3 FragColor; + +void main() +{ + FragColor = vColor.xyz; +} + diff --git a/test_shaders.py b/test_shaders.py index f99a4dc6..81a57c2c 100755 --- a/test_shaders.py +++ b/test_shaders.py @@ -192,8 +192,8 @@ def shader_to_sm(shader): return '60' elif '.sm51.' in shader: return '51' - elif '.sm20.' in shader: - return '20' + elif '.sm30.' in shader: + return '30' else: return '50'