mirror of
https://github.com/antopilo/Nuake.git
synced 2026-01-04 22:10:34 +03:00
Added spotlight gizmo + yellow gizmo when selected
This commit is contained in:
@@ -91,6 +91,7 @@ struct PSOutput {
|
||||
|
||||
struct DebugConstant
|
||||
{
|
||||
float4 Color;
|
||||
float4x4 Transform;
|
||||
int TextureID;
|
||||
};
|
||||
@@ -117,7 +118,7 @@ PSOutput main(PSInput input)
|
||||
discard;
|
||||
}
|
||||
|
||||
output.oColor0 = textureSample;
|
||||
output.oColor0 = textureSample * pushConstants.Color;
|
||||
}
|
||||
|
||||
return output;
|
||||
|
||||
@@ -82,6 +82,7 @@ StructuredBuffer<CameraView> cameras;
|
||||
|
||||
struct DebugConstant
|
||||
{
|
||||
float4 Color;
|
||||
float4x4 Transform;
|
||||
int TextureID;
|
||||
};
|
||||
|
||||
@@ -322,7 +322,7 @@ PSOutput main(PSInput input)
|
||||
float theta = dot(L, normalize(-light.direction));
|
||||
float epsilon = light.innerConeAngle - light.outerConeAngle;
|
||||
float intensity = clamp((theta - light.outerConeAngle) / epsilon, 0.0, 1.0);
|
||||
radiance = light.color * intensity;
|
||||
radiance = light.color * intensity * attenuation;
|
||||
}
|
||||
|
||||
float3 H = normalize(V + L);
|
||||
|
||||
Reference in New Issue
Block a user