Fix InstanceOrigin, PerInstanceRandom and LODDitherFactor to not use interpolation between shader stages
This commit is contained in:
@@ -76,8 +76,8 @@ struct VertexOutput
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
||||
#endif
|
||||
float3 InstanceOrigin : TEXCOORD6;
|
||||
float InstanceParams : TEXCOORD7; // x-PerInstanceRandom
|
||||
nointerpolation float3 InstanceOrigin : TEXCOORD6;
|
||||
nointerpolation float InstanceParams : TEXCOORD7; // x-PerInstanceRandom
|
||||
};
|
||||
|
||||
// Interpolants passed to the pixel shader
|
||||
@@ -94,8 +94,8 @@ struct PixelInput
|
||||
#if USE_CUSTOM_VERTEX_INTERPOLATORS
|
||||
float4 CustomVSToPS[CUSTOM_VERTEX_INTERPOLATORS_COUNT] : TEXCOORD9;
|
||||
#endif
|
||||
float3 InstanceOrigin : TEXCOORD6;
|
||||
float InstanceParams : TEXCOORD7; // x-PerInstanceRandom
|
||||
nointerpolation float3 InstanceOrigin : TEXCOORD6;
|
||||
nointerpolation float InstanceParams : TEXCOORD7; // x-PerInstanceRandom
|
||||
bool IsFrontFace : SV_IsFrontFace;
|
||||
};
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ struct GeometryData
|
||||
#endif
|
||||
float3 WorldNormal : TEXCOORD3;
|
||||
float4 WorldTangent : TEXCOORD4;
|
||||
float3 InstanceOrigin : TEXCOORD5;
|
||||
float2 InstanceParams : TEXCOORD6; // x-PerInstanceRandom, y-LODDitherFactor
|
||||
nointerpolation float3 InstanceOrigin : TEXCOORD5;
|
||||
nointerpolation float2 InstanceParams : TEXCOORD6; // x-PerInstanceRandom, y-LODDitherFactor
|
||||
float3 PrevWorldPosition : TEXCOORD7;
|
||||
};
|
||||
|
||||
|
||||
@@ -98,7 +98,6 @@ struct ModelInput
|
||||
#if USE_VERTEX_COLOR
|
||||
half4 Color : COLOR;
|
||||
#endif
|
||||
|
||||
#if USE_INSTANCING
|
||||
float4 InstanceOrigin : ATTRIBUTE0; // .w contains PerInstanceRandom
|
||||
float4 InstanceTransform1 : ATTRIBUTE1; // .w contains LODDitherFactor
|
||||
@@ -111,7 +110,6 @@ struct ModelInput
|
||||
struct ModelInput_PosOnly
|
||||
{
|
||||
float3 Position : POSITION;
|
||||
|
||||
#if USE_INSTANCING
|
||||
float4 InstanceOrigin : ATTRIBUTE0; // .w contains PerInstanceRandom
|
||||
float4 InstanceTransform1 : ATTRIBUTE1; // .w contains LODDitherFactor
|
||||
@@ -129,7 +127,6 @@ struct ModelInput_Skinned
|
||||
float4 Tangent : TANGENT;
|
||||
uint4 BlendIndices : BLENDINDICES;
|
||||
float4 BlendWeights : BLENDWEIGHT;
|
||||
|
||||
#if USE_INSTANCING
|
||||
float4 InstanceOrigin : ATTRIBUTE0; // .w contains PerInstanceRandom
|
||||
float4 InstanceTransform1 : ATTRIBUTE1; // .w contains LODDitherFactor
|
||||
|
||||
Reference in New Issue
Block a user