コード例 #1
0
        static void freeShader()
        {
            if (mFoliageGPUShader != null)
            {
                if (mFoliageGPUShader.mShader != null)
                {
                    mFoliageGPUShader.mShader.Dispose();
                    mFoliageGPUShader.mShader = null;
                }

                BRenderDevice.getShaderManager().freeShader(mFoliageGPUShader.mFilename);
                mFoliageGPUShader = null;
            }
        }
コード例 #2
0
        void loadShader()
        {
            mDepthPeelShader = BRenderDevice.getShaderManager().getShader(AppDomain.CurrentDomain.BaseDirectory + "\\shaders\\GPUFinalGather.fx", null);

            mShaderWVPHandle        = mDepthPeelShader.getEffectParam("worldViewProj");
            mShaderPrevDepthTexture = mDepthPeelShader.getEffectParam("prevDepthTexture");
            mShaderGlobalRayDir     = mDepthPeelShader.getEffectParam("globalRayDirection");
            mShaderWorldPosFromCam  = mDepthPeelShader.getEffectParam("worldPosFromCamTexture");

            mShaderWorldToCamMatrix   = mDepthPeelShader.getEffectParam("gWorldToCamera");
            mShaderWorldToLightMatrix = mDepthPeelShader.getEffectParam("gWorldToLight");

            mShaderIrradianceTexture = mDepthPeelShader.getEffectParam("irradianceTexture");

            mShaderDepthLayerTexture = mDepthPeelShader.getEffectParam("depthLayerTexture");
        }
コード例 #3
0
        public void destroy()
        {
            if (mPositionsTexture != null)
            {
                mPositionsTexture.Dispose();
                mPositionsTexture = null;
            }

            mVB = null;

            if (mTerrainGPUShader != null)
            {
                BRenderDevice.getShaderManager().freeShader(mTerrainGPUShader.mFilename);
                mTerrainGPUShader.mShader.Dispose();
                mTerrainGPUShader.mShader = null;
                mTerrainGPUShader         = null;
            }
        }
コード例 #4
0
        public static void destroy()
        {
            for (int i = 0; i < mModels.Count; i++)
            {
                mModels[i].destroy();
            }
            mModels.Clear();

            mAABBMin = Vector3.Empty;
            mAABBMax = Vector3.Empty;

            if (mGPUShader != null)
            {
                BRenderDevice.getShaderManager().freeShader(mGPUShader.mFilename);
                mGPUShader.mShader.Dispose();
                mGPUShader.mShader = null;
                mGPUShader         = null;
            }
        }
コード例 #5
0
        public void destroy()
        {
            mScene.destroy();
            mScene = null;

            if (mDepthPeelShader != null)
            {
                BRenderDevice.getShaderManager().freeShader(mDepthPeelShader.mFilename);
                mDepthPeelShader.destroy();
                mDepthPeelShader = null;
            }

            mTempTargetSurfFLOAT.Dispose();
            mTempTargetSurfFLOAT = null;
            mTempTargetTexFLOAT.Dispose();
            mTempTargetTexFLOAT = null;

            mTempTargetSurfCOLOR.Dispose();
            mTempTargetSurfCOLOR = null;
            mTempTargetTexCOLOR.Dispose();
            mTempTargetTexCOLOR = null;

            mFullscreenQuad.destroy();
        }
コード例 #6
0
 void loadShader()
 {
     mTerrainGPUShader = BRenderDevice.getShaderManager().getShader(CoreGlobals.getWorkPaths().mEditorShaderDirectory + "\\gpuTerrainExport.fx", mainShaderParams);
     mainShaderParams(null);
 }