HLSL: Add (almost) full expression grammar: Binary, unary (pre/post-fix), assign, ...

This commit is contained in:
John Kessenich
2016-05-03 23:17:20 -06:00
parent 9c86c6ab5b
commit 34fb036a9c
10 changed files with 550 additions and 99 deletions

View File

@@ -1,7 +1,11 @@
float4 AmbientColor = float4(1, 0.5, 0, 1);
//float4 AmbientColor = float4(1, 0.5, 0, 1);
//float AmbientIntensity = 0.1;
float4 PixelShaderFunction(float4 input) : COLOR0
{
return input /* * AmbientIntensity */ + AmbientColor;
// return input * AmbientIntensity + AmbientColor;
return input * input + input * input;
return input + input * input + input;
return ++input * -+-+--input;
return input++ + ++input;
}