Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

BasicTechniques FeatureSample missing the Sample43 HLSL custom shader, only glsl was included #69

Open
utekai opened this issue Feb 5, 2019 · 0 comments

Comments

@utekai
Copy link

utekai commented Feb 5, 2019

Here is the missing HLSL shader, if you happen to want to run that sample on UWP.

#include "Uniforms.hlsl"
#include "Samplers.hlsl"
#include "Transform.hlsl"
#include "ScreenPos.hlsl"

void VS(float4 iPos : POSITION,
float3 iNormal : NORMAL,
float4 iTangent : TANGENT,
float2 iTexCoord : TEXCOORD0,
out float2 oTexCoord : TEXCOORD0,
out float3 oNormal : TEXCOORD1,
out float4 oWorldPos : TEXCOORD2,
out float4 oTangent : TEXCOORD3,
out float4 oEyeVec : TEXCOORD4,
out float4 oScreenPos : TEXCOORD5,
out float4 oPos : OUTPOSITION)
{
float3 worldPos = GetWorldPos(iModelMatrix);
oPos = GetClipPos(worldPos);
oNormal = GetWorldNormal(iModelMatrix);
oWorldPos = float4(worldPos, GetDepth(oPos));
float3 tangent = GetWorldTangent(iModelMatrix);
float3 bitangent = cross(tangent, oNormal) * iTangent.w;
oTexCoord = float4(GetTexCoord(iTexCoord), bitangent.xy);
oEyeVec = float4(cCameraPos - worldPos, GetDepth(oPos));
}

void PS(
float4 iTexCoord : TEXCOORD0,
float3 iNormal : TEXCOORD1,
float4 iWorldPos : TEXCOORD2,
float4 iTangent : TEXCOORD3,
float4 iEyeVec : TEXCOORD4,
float4 iScreenPos : TEXCOORD5,
out float4 oColor : OUTCOLOR0)
{
float f = dot(normalize(iEyeVec.xyz), normalize(iNormal));
oColor = float4(1,1,1,1-f);
}

@utekai utekai changed the title BasicTechniques FeatureSample missing the custom shader for DirectX BasicTechniques FeatureSample missing the Sample43 HLSL custom shader, only glsl was included Feb 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant