https://github.com/shader-slang/slang
Raw File
Tip revision: 227f9f5a9d8ac0d88079b6175b3f31c8f05fabd0 authored by Tim Foley on 26 August 2017, 03:13:19 UTC
Merge pull request #173 from tfoleyNV/resources-in-structs-fixes
Tip revision: 227f9f5
gh-103.slang
//TEST:COMPARE_HLSL: -profile ps_4_0 -entry main

// Ensure that matrix-times-scalar works

float4x4 doIt(float4x4 a, float b)
{
	return a * b;
}

cbuffer C
{
	float4x4 a;
	float b;	
};

float4 main() : SV_Target
{
	return doIt(a, b)[0];
}
back to top