Skip to content

Commit

Permalink
The Park: Move sun reflection to infinity
Browse files Browse the repository at this point in the history
It's post-processed, but the pixel shader has no transformations of
note, so adjust the texcoord output from the vertex shader to move the
sun to infinity.

Also fixes specular highlights on The Park roof.
  • Loading branch information
DarkStarSword committed May 22, 2016
1 parent fa57d18 commit 5d74514
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion The Park/ShaderFixes/b1d33e7ed718f2a2-vs_replace.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Sun reflection, ambient lighting, etc.
// ---- Created with 3Dmigoto v1.2.39 on Sun May 22 23:34:01 2016
cbuffer cb1 : register(b1)
{
Expand Down Expand Up @@ -35,9 +36,13 @@ void main(
r0.xy = cb1[2].xy * r0.xy;
r0.xy = r0.xy * float2(2,2) + float2(-1,-1);
r0.xy = float2(1,-1) * r0.xy;
o2.xy = r0.xy;

// Move sun reflection to infinity:
r0.x -= StereoParams.Load(0).x;

r1.xyz = cb0[33].xyz * r0.yyy;
r1.xyz = r0.xxx * cb0[32].xyz + r1.xyz;
o2.xy = r0.xy;
o1.xyz = cb0[34].xyz + r1.xyz;
o2.zw = float2(0,1);
return;
Expand Down

0 comments on commit 5d74514

Please sign in to comment.