static void freeShader() { if (mFoliageGPUShader != null) { if (mFoliageGPUShader.mShader != null) { mFoliageGPUShader.mShader.Dispose(); mFoliageGPUShader.mShader = null; } BRenderDevice.getShaderManager().freeShader(mFoliageGPUShader.mFilename); mFoliageGPUShader = null; } }
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"); }
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; } }
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; } }
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(); }
void loadShader() { mTerrainGPUShader = BRenderDevice.getShaderManager().getShader(CoreGlobals.getWorkPaths().mEditorShaderDirectory + "\\gpuTerrainExport.fx", mainShaderParams); mainShaderParams(null); }