EEVEE-Next: Jittered Soft Shadows #119753
|
@ -44,7 +44,6 @@ struct Light : public LightData, NonCopyable {
|
|||
public:
|
||||
bool initialized = false;
|
||||
bool used = false;
|
||||
float jittering = 0.0f;
|
||||
|
||||
/** Pointers to source Shadow. Type depends on `LightData::type`. */
|
||||
ShadowDirectional *directional = nullptr;
|
||||
|
|
|
@ -822,7 +822,7 @@ struct LightData {
|
|||
/** Punctual: Shift to apply to the light origin to get the shadow projection origin. */
|
||||
float shadow_projection_shift;
|
||||
packed_float3 shadow_origin_shift;
|
||||
float _pad1;
|
||||
float jittering;
|
||||
};
|
||||
BLI_STATIC_ASSERT_ALIGN(LightData, 16)
|
||||
|
||||
|
|
|
@ -294,6 +294,8 @@ ShadowRayPunctual shadow_ray_generate_punctual(LightData light,
|
|||
random_2d = sample_disk(random_2d);
|
||||
}
|
||||
|
||||
random_2d *= 1.0 - light.jittering;
|
||||
|
||||
float clip_far = intBitsToFloat(light.clip_far);
|
||||
float clip_near = intBitsToFloat(light.clip_near);
|
||||
float clip_side = light.clip_side;
|
||||
|
|
Loading…
Reference in New Issue