Added spotlight gizmo + yellow gizmo when selected

This commit is contained in:
antopilo
2025-04-14 10:38:53 -04:00
parent 1f219ba8bc
commit f4fd6e78f3
11 changed files with 154 additions and 45 deletions

View File

@@ -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;

View File

@@ -82,6 +82,7 @@ StructuredBuffer<CameraView> cameras;
struct DebugConstant
{
float4 Color;
float4x4 Transform;
int TextureID;
};

View File

@@ -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);