Esempio n. 1
0
    private void ResetRenderingTextures(MaskParameters iParameters)
    {
        // Prepare render textures.
        globalOcclusionMask = new RenderTexture(Screen.width, Screen.height, 0)
        {
            name = "Processed Occlusion Mask"
        };

        occlusionMaskExtended = new RenderTexture(iParameters.extendedTextureSize.x, iParameters.extendedTextureSize.y, 0)
        {
            name = "Processed Extended Occlusion Mask"
        };

        mixedLightMask = new RenderTexture(Screen.width, Screen.height, 0)
        {
            name = "Mixed Light Mask"
        };

        obstacleLightMask = new RenderTexture((int)(iParameters.lightTextureSize.x * iParameters.wallTextureRescale), (int)(iParameters.lightTextureSize.y * iParameters.wallTextureRescale), 0)
        {
            name = "Light Mask"
        };

        // Let members handle their own textures.
        // Possibly move to container?
        mOcclusionMaskRenderer.ResetRenderingTextures(iParameters);
        mLightMaskRenderer.ResetRenderingTextures(iParameters);
        mPostProcessingStack.ResetRenderingTextures(iParameters);
        mBackgroundRenderer.ResetRenderingTextures(iParameters);
    }
Esempio n. 2
0
    private void ResolveRenderingTextures(OperationParameters iParameters)
    {
        // Prepare render textures.
        occlusionMaskExtended = new PixelPerfectRT(operationParameters.fovPPRTParameter);

        globalOcclusionMask = new PixelPerfectRT(operationParameters.lightPPRTParameter);

        obstacleLightMask = new PixelPerfectRT(operationParameters.obstacleLightPPRTParameter);

        // Let members handle their own textures.
        // Possibly move to container?
        mPostProcessingStack.ResetRenderingTextures(iParameters);
        mBackgroundRenderer.ResetRenderingTextures(iParameters);
    }
Esempio n. 3
0
    private void ResolveRenderingTextures(OperationParameters iParameters)
    {
        // Prepare render textures.
        floorOcclusionMask           = new PixelPerfectRT(operationParameters.fovPPRTParameter);
        wallFloorOcclusionMask       = new PixelPerfectRT(operationParameters.fovPPRTParameter);
        mTex2DWallFloorOcclusionMask = new Texture2D(wallFloorOcclusionMask.renderTexture.width, wallFloorOcclusionMask.renderTexture.height, TextureFormat.RGB24, false);

        objectOcclusionMask = new PixelPerfectRT(operationParameters.lightPPRTParameter);

        obstacleLightMask = new PixelPerfectRT(operationParameters.obstacleLightPPRTParameter);

        // Let members handle their own textures.
        // Possibly move to container?
        mPostProcessingStack.ResetRenderingTextures(iParameters);
        mBackgroundRenderer.ResetRenderingTextures(iParameters);
    }