Created
October 18, 2012 12:53
-
-
Save stoyannk/3911618 to your computer and use it in GitHub Desktop.
Simple enhanced gbuffer pixel shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
polymorphic MakeDepth | |
{ | |
CalculateProjectionDepth | |
} | |
polymorphic GetWorldNormal | |
{ | |
NormalFromInput, | |
NormalFromMap | |
} | |
pixel_shader float4 PS(PS_INPUT input) : SV_Target needs VERTEX_COLOR | |
{ | |
context.depth_p = MakeDepth(); | |
context.normal_w = GetWorldNormal(); | |
return float4(context.normal_w.x | |
, context.normal_w.y | |
, context.normal_w.z | |
, context.depth_p); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment