Merge branch 'Sprites'
This commit is contained in:
@@ -8,13 +8,12 @@
|
||||
/////////////
|
||||
Texture2D shaderTexture : register(t0);
|
||||
SamplerState SampleType : register(s0);
|
||||
|
||||
cbuffer LightBuffer
|
||||
{
|
||||
float4 ambientColor;
|
||||
float4 diffuseColor;
|
||||
float3 lightDirection;
|
||||
float padding;
|
||||
float padding;
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +24,7 @@ struct PixelInputType
|
||||
{
|
||||
float4 position : SV_POSITION;
|
||||
float2 tex : TEXCOORD0;
|
||||
float3 normal : NORMAL;
|
||||
float3 normal : NORMAL;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,14 +33,14 @@ struct PixelInputType
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
float4 LightPixelShader(PixelInputType input) : SV_TARGET
|
||||
{
|
||||
float4 textureColor;
|
||||
float3 lightDir;
|
||||
float lightIntensity;
|
||||
float4 color;
|
||||
float4 textureColor;
|
||||
float3 lightDir;
|
||||
float lightIntensity;
|
||||
float4 color;
|
||||
|
||||
|
||||
// Sample the pixel color from the texture using the sampler at this texture coordinate location.
|
||||
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||
// Sample the pixel color from the texture using the sampler at this texture coordinate location.
|
||||
textureColor = shaderTexture.Sample(SampleType, input.tex);
|
||||
|
||||
// Set the default output color to the ambient light value for all pixels.
|
||||
color = ambientColor;
|
||||
@@ -62,7 +61,7 @@ float4 LightPixelShader(PixelInputType input) : SV_TARGET
|
||||
color = saturate(color);
|
||||
|
||||
// Multiply the texture pixel and the final diffuse color to get the final pixel color result.
|
||||
color = color * textureColor;
|
||||
color = color * textureColor;
|
||||
|
||||
return color;
|
||||
}
|
||||
return color;
|
||||
}
|
||||
Reference in New Issue
Block a user