Works like garbage
This commit is contained in:
@@ -32,7 +32,11 @@ VertexOutput vert(VertexInput input)
|
||||
// Which vertex should be read?
|
||||
local_vert_id = local_vert_id == 0 ? 2 : (local_vert_id == 2 ? 0 : 1);
|
||||
float3 positionRWS = pParams.currentVertexBuffer[output.triangleID * 3 + local_vert_id].xyz;
|
||||
//positionRWS.y = pParams.displacementMap.SampleLevel(pParams.displacementSampler, positionRWS.xz, 0).r;
|
||||
|
||||
float2 texCoord = positionRWS.xz / 1000;
|
||||
|
||||
positionRWS.y = pParams.displacementMap.SampleLevel(pParams.displacementSampler, texCoord, 0).r * 100;
|
||||
// Apply the view projection
|
||||
output.positionCS = mul(pViewParams.projectionMatrix, mul(pViewParams.viewMatrix, float4(positionRWS, 1.0)));
|
||||
return output;
|
||||
|
||||
@@ -86,6 +86,10 @@ struct ComputeParams
|
||||
// 22
|
||||
StructuredBuffer<float> lebMatrixCache;
|
||||
// 23
|
||||
globallycoherent RWStructuredBuffer<DebugStruct> debugBuffer;
|
||||
RWStructuredBuffer<DebugStruct> debugBuffer;
|
||||
// 24
|
||||
SamplerState displacementSampler;
|
||||
// 25
|
||||
Texture2D<float4> displacementMap;
|
||||
};
|
||||
ParameterBlock<ComputeParams> pParams;
|
||||
|
||||
Reference in New Issue
Block a user