Initial data

This commit is contained in:
Michael Fabian Dirks 2017-06-28 23:55:30 +02:00
parent 7fe4ab776c
commit e3d217712f
6 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b75bbc8aa7d4822f20e16caae51d40276c27af63395df9316016d409a7014a90
size 109

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac6e946eb0efa1b17b3af576d0276fcdbddbb2f57acd3c76b851af0edb7f8303
size 3938970

58
data/displacement.effect Normal file
View file

@ -0,0 +1,58 @@
uniform float4x4 ViewProj;
uniform texture2d image;
uniform texture2d displacementMap;
uniform float2 texelScale;
uniform float2 displacementScale;
sampler_state textureSampler {
Filter = Trilinear;
AddressU = Wrap;
AddressV = Wrap;
};
sampler_state dispTextureSampler {
Filter = Trilinear;
AddressU = Clamp;
AddressV = Clamp;
};
struct VertDataIn {
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
struct VertDataOut {
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
VertDataOut VSDefault(VertDataIn v_in)
{
VertDataOut vert_out;
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
vert_out.uv = v_in.uv;
return vert_out;
}
float4 PSDisplace(VertDataOut v_in) : TARGET
{
float2 disp = displacementMap.Sample(dispTextureSampler, v_in.uv).rg - float2(0.5, 0.5);
// Handle 0..255 correctly (127, 128 are center)
float2 signdisp = disp * float2(281474976710656.0, 281474976710656.0);
float2 signs = float2(clamp(disp.r, -1.0, 1.0), clamp(disp.g, -1.0, 1.0));
disp = (floor(abs(disp * 127.0)) / 127.0) * signs;
float2 uv = v_in.uv + (disp * texelScale * displacementScale);
float4 rgba = image.Sample(textureSampler, uv);
return rgba;
}
technique Draw
{
pass
{
vertex_shader = VSDefault(v_in);
pixel_shader = PSDisplace(v_in);
}
}

3
data/displacement.png Normal file
View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5ccdfcd90e7d98a4e4cb0295a52334017d235139bd8ce6490276c07be258a5ed
size 689790

7
data/locale/en-US.ini Normal file
View file

@ -0,0 +1,7 @@
Shape="Shape"
Shape.Loop="Repeat last Point"
Shape.Points="Points"
Shape.Point.X="Point %llu X"
Shape.Point.Y="Point %llu Y"
Shape.Point.U="Point %llu U"
Shape.Point.V="Point %llu V"

3
data/neutral.png Normal file
View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef80b2c7098074482d7d52ff1187e59bc799bc906538538d2328c30a578f9db2
size 16801