|
|
@ -69,9 +69,13 @@ namespace FidelityFX |
|
|
[Serializable] |
|
|
[Serializable] |
|
|
public class GenerateReactiveParameters |
|
|
public class GenerateReactiveParameters |
|
|
{ |
|
|
{ |
|
|
|
|
|
[Tooltip("A value to scale the output")] |
|
|
[Range(0, 2)] public float scale = 0.5f; |
|
|
[Range(0, 2)] public float scale = 0.5f; |
|
|
|
|
|
[Tooltip("A threshold value to generate a binary reactive mask")] |
|
|
[Range(0, 1)] public float cutoffThreshold = 0.2f; |
|
|
[Range(0, 1)] public float cutoffThreshold = 0.2f; |
|
|
|
|
|
[Tooltip("A value to set for the binary reactive mask")] |
|
|
[Range(0, 1)] public float binaryValue = 0.9f; |
|
|
[Range(0, 1)] public float binaryValue = 0.9f; |
|
|
|
|
|
[Tooltip("Flags to determine how to generate the reactive mask")] |
|
|
public Fsr2.GenerateReactiveFlags flags = Fsr2.GenerateReactiveFlags.ApplyTonemap | Fsr2.GenerateReactiveFlags.ApplyThreshold | Fsr2.GenerateReactiveFlags.UseComponentsMax; |
|
|
public Fsr2.GenerateReactiveFlags flags = Fsr2.GenerateReactiveFlags.ApplyTonemap | Fsr2.GenerateReactiveFlags.ApplyThreshold | Fsr2.GenerateReactiveFlags.UseComponentsMax; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -266,6 +270,7 @@ namespace FidelityFX |
|
|
_renderCamera.rect = new Rect(0, 0, _originalRect.width * _renderSize.x / _renderCamera.pixelWidth, _originalRect.height * _renderSize.y / _renderCamera.pixelHeight); |
|
|
_renderCamera.rect = new Rect(0, 0, _originalRect.width * _renderSize.x / _renderCamera.pixelWidth, _originalRect.height * _renderSize.y / _renderCamera.pixelHeight); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Set up the opaque-only command buffer to make a copy of the camera color buffer right before transparent drawing starts
|
|
|
_opaqueInputCommandBuffer.Clear(); |
|
|
_opaqueInputCommandBuffer.Clear(); |
|
|
if (autoGenerateReactiveMask || autoGenerateTransparencyAndComposition) |
|
|
if (autoGenerateReactiveMask || autoGenerateTransparencyAndComposition) |
|
|
{ |
|
|
{ |
|
|
@ -314,6 +319,7 @@ namespace FidelityFX |
|
|
_dispatchDescription.Reset = _reset; |
|
|
_dispatchDescription.Reset = _reset; |
|
|
_reset = false; |
|
|
_reset = false; |
|
|
|
|
|
|
|
|
|
|
|
// Set up the parameters for the optional experimental auto-TCR feature
|
|
|
_dispatchDescription.EnableAutoReactive = autoGenerateTransparencyAndComposition; |
|
|
_dispatchDescription.EnableAutoReactive = autoGenerateTransparencyAndComposition; |
|
|
if (autoGenerateTransparencyAndComposition) |
|
|
if (autoGenerateTransparencyAndComposition) |
|
|
{ |
|
|
{ |
|
|
|