diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-28 23:48:32 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-28 23:48:32 +0000 |
| commit | 8f90332eded5d74489b7034db58a8f92c5df7f86 (patch) | |
| tree | 79e5e36d17404d70a9bd65081e0a3065410542ae /unityplugin/GhostCubeScene/assets | |
| parent | Updated submodules (diff) | |
| download | DiligentEngine-8f90332eded5d74489b7034db58a8f92c5df7f86.tar.gz DiligentEngine-8f90332eded5d74489b7034db58a8f92c5df7f86.zip | |
Removed legacy VS project and solution files, updated project dependencies.
Diffstat (limited to 'unityplugin/GhostCubeScene/assets')
| -rw-r--r-- | unityplugin/GhostCubeScene/assets/shaders/Mirror.psh | 14 | ||||
| -rw-r--r-- | unityplugin/GhostCubeScene/assets/shaders/Mirror.vsh | 33 |
2 files changed, 47 insertions, 0 deletions
diff --git a/unityplugin/GhostCubeScene/assets/shaders/Mirror.psh b/unityplugin/GhostCubeScene/assets/shaders/Mirror.psh new file mode 100644 index 0000000..86b4beb --- /dev/null +++ b/unityplugin/GhostCubeScene/assets/shaders/Mirror.psh @@ -0,0 +1,14 @@ + +Texture2D g_tex2Reflection; +SamplerState g_tex2Reflection_sampler; + +struct PSInput +{ + float4 Pos : SV_POSITION; + float2 UV : TEX_COORD; +}; + +float4 main(PSInput In) : SV_Target +{ + return g_tex2Reflection.Sample(g_tex2Reflection_sampler, In.UV); +} diff --git a/unityplugin/GhostCubeScene/assets/shaders/Mirror.vsh b/unityplugin/GhostCubeScene/assets/shaders/Mirror.vsh new file mode 100644 index 0000000..bdeaaca --- /dev/null +++ b/unityplugin/GhostCubeScene/assets/shaders/Mirror.vsh @@ -0,0 +1,33 @@ +cbuffer Constants +{ + float4x4 g_WorldViewProj; +}; + +struct PSInput +{ + float4 Pos : SV_POSITION; + float2 UV : TEX_COORD; +}; + +PSInput main(uint VertId : SV_VertexID) +{ + float4 Pos[] = + { + float4(-0.5, +0.5, 0.0, 1.0), + float4(-0.5, -0.5, 0.0, 1.0), + float4(+0.5, +0.5, 0.0, 1.0), + float4(+0.5, -0.5, 0.0, 1.0) + }; + float2 UV[] = + { + float2(0.0, 1.0), + float2(0.0, 0.0), + float2(1.0, 1.0), + float2(1.0, 0.0) + }; + + PSInput ps; + ps.Pos = mul( Pos[VertId], g_WorldViewProj); + ps.UV = UV[VertId]; + return ps; +} |
