Exemple #1
0
    private ResourceRef <Material> mGaussBlurVer;               // Material for vertical pass of gauss blur

    public AasRenderer(RenderingDevice device, ShapeRenderer2d shapeRenderer2d, ShapeRenderer3d shapeRenderer3d)
    {
        mDevice                 = device;
        mShapeRenderer2d        = shapeRenderer2d;
        mShapeRenderer3d        = shapeRenderer3d;
        mGeometryShadowMaterial = CreateGeometryShadowMaterial(device);
        mShadowTarget           = device.CreateRenderTargetTexture(BufferFormat.A8R8G8B8, ShadowMapWidth, ShadowMapHeight,
                                                                   debugName: "AASShadowTarget");
        mShadowTargetTmp = device.CreateRenderTargetTexture(BufferFormat.A8R8G8B8, ShadowMapWidth, ShadowMapHeight,
                                                            debugName: "AASShadowTargetTmp");
        mShadowMapMaterial = CreateShadowMapMaterial(device);
        mGaussBlurHor      = CreateGaussBlurMaterial(device, mShadowTarget, true);
        mGaussBlurVer      = CreateGaussBlurMaterial(device, mShadowTargetTmp, false);
    }