Added follow cam

Added "Controlled" mesh classes
Added Global Lighting Class
Added Gamepad controls
Split terrain nodes into Height and Perlin classes
Fixed Splitmesh node stuff
This commit is contained in:
iDunnoDev
2022-05-09 17:50:22 +01:00
committed by iDunnoDev
parent bc906064e5
commit f6bba67897
58 changed files with 1743 additions and 351 deletions

36
Graphics2/SkyShader.hlsl Normal file
View File

@ -0,0 +1,36 @@
cbuffer ConstantBuffer
{
float4x4 completeTransformation;
};
TextureCube cubeMap;
SamplerState samTriLinearSam;
struct VertexIn
{
float3 Position : POSITION;
};
struct VertexOut
{
float4 Position : SV_POSITION;
float3 TexCoord : TEXCOORD;
};
VertexOut VS(VertexIn vin)
{
VertexOut vout;
// Set z = w so that z/w = 1 (i.e., skydome always on far plane).
vout.Position = mul(float4(vin.Position, 1.0f), completeTransformation).xyww;
vout.TexCoord = vin.Position;
return vout;
}
float4 PS(VertexOut pin) : SV_Target
{
return cubeMap.Sample(samTriLinearSam, pin.TexCoord);
}