aboutsummaryrefslogtreecommitdiff
path: root/samples/AnselSDKIntegration/Shaders.fx
diff options
context:
space:
mode:
authorDmitry Duka <[email protected]>2017-12-25 16:33:24 +0300
committerDmitry Duka <[email protected]>2017-12-25 16:33:24 +0300
commit5f878c94fd7b1a5d400ebc80b83821b9289ecf08 (patch)
tree50e1b10cca5b609fb1aebf589f2a2130d366bf19 /samples/AnselSDKIntegration/Shaders.fx
parentAddressing issue #2. Fixing Cleanup() function in the sample application. (diff)
parentUpdating Ansel SDK 1.5, no functional changes. Fixing startSession/stopSessio... (diff)
downloadanselsdk-1.5.396.tar.xz
anselsdk-1.5.396.zip
Merge branch 'master' into 1.5v1.5.396
Diffstat (limited to 'samples/AnselSDKIntegration/Shaders.fx')
-rw-r--r--samples/AnselSDKIntegration/Shaders.fx118
1 files changed, 59 insertions, 59 deletions
diff --git a/samples/AnselSDKIntegration/Shaders.fx b/samples/AnselSDKIntegration/Shaders.fx
index abac43c..8c1b4bd 100644
--- a/samples/AnselSDKIntegration/Shaders.fx
+++ b/samples/AnselSDKIntegration/Shaders.fx
@@ -1,59 +1,59 @@
-cbuffer ConstantBuffer : register( b0 )
-{
- matrix World;
- matrix View;
- matrix Projection;
- float4 vLightDir;
- float4 vLightColor;
- float4 vOutputColor;
- float vTime;
-}
-
-struct VS_INPUT
-{
- float4 Pos : POSITION;
- float3 Norm : NORMAL;
-};
-
-struct PS_INPUT
-{
- float4 Pos : SV_POSITION;
- float3 Norm : TEXCOORD0;
-};
-
-PS_INPUT VS( VS_INPUT input )
-{
- PS_INPUT output = (PS_INPUT)0;
- output.Pos = mul( input.Pos, World );
- output.Pos = mul( output.Pos, View );
- output.Pos = mul( output.Pos, Projection );
- output.Norm = mul( float4( input.Norm, 1 ), World ).xyz;
-
- return output;
-}
-
-float4 PS(PS_INPUT input) : SV_Target
-{
- float4 finalColor = saturate(dot((float3)vLightDir, input.Norm) * vLightColor);
- finalColor.a = 1.0f;
- return finalColor;
-}
-
-PS_INPUT VS_Hud(VS_INPUT input)
-{
- PS_INPUT output = (PS_INPUT)0;
- output.Pos = input.Pos;
- output.Pos.w = 1.0f;
-
- if (input.Norm.x > 1.0f)
- {
- output.Pos.x *= 0.8f * abs(sin(vTime * 0.25f)) + 0.15f;
- }
-
- return output;
-}
-
-float4 PS_Hud(PS_INPUT input) : SV_Target
-{
- return float4(0.33f, 0.5f, 0.906f, 1.0f);
-}
+cbuffer ConstantBuffer : register( b0 )
+{
+ matrix World;
+ matrix View;
+ matrix Projection;
+ float4 vLightDir;
+ float4 vLightColor;
+ float4 vOutputColor;
+ float vTime;
+}
+
+struct VS_INPUT
+{
+ float4 Pos : POSITION;
+ float3 Norm : NORMAL;
+};
+
+struct PS_INPUT
+{
+ float4 Pos : SV_POSITION;
+ float3 Norm : TEXCOORD0;
+};
+
+PS_INPUT VS( VS_INPUT input )
+{
+ PS_INPUT output = (PS_INPUT)0;
+ output.Pos = mul( input.Pos, World );
+ output.Pos = mul( output.Pos, View );
+ output.Pos = mul( output.Pos, Projection );
+ output.Norm = mul( float4( input.Norm, 1 ), World ).xyz;
+
+ return output;
+}
+
+float4 PS(PS_INPUT input) : SV_Target
+{
+ float4 finalColor = saturate(dot((float3)vLightDir, input.Norm) * vLightColor);
+ finalColor.a = 1.0f;
+ return finalColor;
+}
+
+PS_INPUT VS_Hud(VS_INPUT input)
+{
+ PS_INPUT output = (PS_INPUT)0;
+ output.Pos = input.Pos;
+ output.Pos.w = 1.0f;
+
+ if (input.Norm.x > 1.0f)
+ {
+ output.Pos.x *= 0.8f * abs(sin(vTime * 0.25f)) + 0.15f;
+ }
+
+ return output;
+}
+
+float4 PS_Hud(PS_INPUT input) : SV_Target
+{
+ return float4(0.33f, 0.5f, 0.906f, 1.0f);
+}