Texture2D texture1;
SamplerState Sampler;
struct PixelShaderInput
{
float4 position : SV_POSITION;
float3 normal : NORMAL;
float2 UV : UV;
float4 World_pos : World_pos;
};
struct S_L //Spotlight
{
float3 pos; // Position of the spotlight
float range; // Range of the spotlight
float3 dir; // Direction of the spotlight
float cone; // Cone angle of the spotlight
float3 att; // Attenuation of the spotlight (constant, linear, quadratic)
float pad2; // Padding for alignment
float4 ambient; // Ambient color of the spotlight
float4 diffuse; // Diffuse color of the spotlight
};
float4 main(PixelShaderInput input) : SV_TARGET
{
S_L LIGHT;
float4(abs(input.normal), 1.0f);
float4 sampling = texture1.Sample(Sampler, input.UV);
return sampling;
}
struct PixelShaderInput
{
float4 position : SV_POSITION;
float3 normal : NORMAL;
float2 UV : UV;
float4 World_pos : World_pos;
};
struct S_L //Spotlight
{
float3 pos; // Position of the spotlight
float range; // Range of the spotlight
float3 dir; // Direction of the spotlight
float cone; // Cone angle of the spotlight
float3 att; // Attenuation of the spotlight (constant, linear, quadratic)
float pad2; // Padding for alignment
float4 ambient; // Ambient color of the spotlight
float4 diffuse; // Diffuse color of the spotlight
};
float4 main(PixelShaderInput input) : SV_TARGET
{
S_L LIGHT;
float4(abs(input.normal), 1.0f);
float4 sampling = texture1.Sample(Sampler, input.UV);
return sampling;
}
```