Apply ab38f8b1's changes to offscreen HLSL shaders
This commit is contained in:
parent
8cacf0b4e9
commit
7b12f89deb
3 changed files with 6 additions and 4 deletions
|
|
@ -10,6 +10,7 @@ struct VSInput
|
|||
struct UBO
|
||||
{
|
||||
float4x4 projection;
|
||||
float4x4 view;
|
||||
float4x4 model;
|
||||
float4 lightPos;
|
||||
};
|
||||
|
|
@ -31,8 +32,8 @@ VSOutput main(VSInput input)
|
|||
VSOutput output = (VSOutput)0;
|
||||
output.Normal = input.Normal;
|
||||
output.Color = input.Color;
|
||||
output.Pos = mul(ubo.projection, mul(ubo.model, input.Pos));
|
||||
output.EyePos = mul(ubo.model, input.Pos).xyz;
|
||||
output.Pos = mul(ubo.projection, mul(ubo.view, mul(ubo.model, input.Pos)));
|
||||
output.EyePos = mul(ubo.view, mul(ubo.model, input.Pos)).xyz;
|
||||
output.LightVec = normalize(ubo.lightPos.xyz - output.EyePos);
|
||||
|
||||
// Clip against reflection plane
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue