mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-09 12:00:05 +00:00
30 lines
452 B
GLSL
30 lines
452 B
GLSL
|
struct OS {
|
||
|
SamplerState ss;
|
||
|
float a;
|
||
|
Texture2D tex;
|
||
|
};
|
||
|
|
||
|
SamplerState gss;
|
||
|
SamplerState gss2;
|
||
|
Texture2D gtex;
|
||
|
|
||
|
float4 osCall(OS s)
|
||
|
{
|
||
|
return s.a * s.tex.Sample(s.ss, float2(0.2, 0.3));
|
||
|
}
|
||
|
|
||
|
float4 main() : SV_TARGET0
|
||
|
{
|
||
|
OS os;
|
||
|
os.ss = gss2;
|
||
|
os.ss = gss;
|
||
|
os.tex = gtex;
|
||
|
os.a = 3.0;
|
||
|
|
||
|
// this should give an error
|
||
|
//SamplerState localss;
|
||
|
//localss = gss2;
|
||
|
|
||
|
return osCall(os);
|
||
|
}
|