Beispiel #1
0
    public void Update(DeviceContext context, ImageBasedLightingEnvironment lightingEnvironment, ShaderResourceView controlVertexInfosView, ShapeNormals shapeNormals)
    {
        if (this.shapeNormals != shapeNormals || texturedVertexInfoPairsView == null)
        {
            this.shapeNormals = shapeNormals;

            texturedVertexInfoPairsView?.Dispose();
            var pairs = TexturedVertexInfoPair.Interleave(primaryTexturedVertexInfos, shapeNormals?.TexturedVertexInfos);
            texturedVertexInfoPairsView = BufferUtilities.ToStructuredBufferView(device, pairs);
        }

        scatterer?.Scatter(context, lightingEnvironment, controlVertexInfosView);
        vertexRefiner.RefineVertices(context, controlVertexInfosView, scatterer?.ScatteredIlluminationView);
    }
Beispiel #2
0
 public void Update(DeviceContext context, ImageBasedLightingEnvironment lightingEnvironment, ShaderResourceView controlVertexInfosView)
 {
     scatterer?.Scatter(context, lightingEnvironment, controlVertexInfosView);
     vertexRefiner.RefineVertices(context, controlVertexInfosView, scatterer?.ScatteredIlluminationView);
 }