You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2021. It is now read-only.
The text was updated successfully, but these errors were encountered:
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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);
}
The text was updated successfully, but these errors were encountered: