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:
36
Graphics2/SkyShader.hlsl
Normal file
36
Graphics2/SkyShader.hlsl
Normal 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user