You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
819 B
25 lines
819 B
using UnityEngine;
|
|
using UnityEngine.VFX;
|
|
|
|
namespace UnityEditor.VFX
|
|
{
|
|
sealed class VFXExpressionSampleCameraBuffer : VFXExpression
|
|
{
|
|
public VFXExpressionSampleCameraBuffer() : this(VFXCameraBufferValue.Default, VFXValue<Vector2>.Default)
|
|
{
|
|
}
|
|
|
|
public VFXExpressionSampleCameraBuffer(VFXExpression cameraBuffer, VFXExpression uv)
|
|
: base(Flags.InvalidOnCPU, new [] { cameraBuffer, uv })
|
|
{
|
|
}
|
|
|
|
public override VFXExpressionOperation operation => VFXExpressionOperation.None;
|
|
public override VFXValueType valueType => VFXValueType.Float4;
|
|
|
|
public override string GetCodeString(string[] parents)
|
|
{
|
|
return string.Format("SAMPLE_TEXTURE2D_X_LOD({0}, sampler{0}, {1}, 0)", parents[0], parents[1]);
|
|
}
|
|
}
|
|
}
|