void SaAoRenderer::reloadShaders() { if (geometryPassShader) delete geometryPassShader; if (processingPassShader) delete processingPassShader; if (filteringPassShader) delete filteringPassShader; /* geometryPassShader = new SaAoGeometryPassShader(); processingPassShader = new SaAoProcessingPassShader(shadersCompileConstants); filteringPassShader = new SaAoFilteringPassShader(); */ initShaderPrograms(); VSGLInfoLib::getUniformsInfo(processingPassShader->getId()); screenSpaceRayOrigin = glm::vec2(0,0); screenSpaceEmisphereCenter = glm::vec2(0,0); setTextureMapping(isTextureMappingEnabled()); setNormalMapping(isNormalMappingEnabled()); setSpecularMapping(isSpecularMappingEnabled()); setOpacityMapping(isOpacityMappingEnabled()); setShowingGBuffer(isShowingGBuffer()); /* setShowingArea(isShowingArea()); setShowingSampling(isShowingSampling()); setShowingSamplingDensity(isShowingSamplingDensity()); setShowingZoomedArea(isShowingZoomedArea()); */ setAoSamplingRadius(getAoSamplingRadius()); setAoAngleBias(getAoAngleBias()); setAoMaxDistance(getAoMaxDistance()); setAoNumSamples(getAoNumSamples()); setSamplingPatternId(getSamplingPatternId()); setAoMultiplier(getAoMultiplier()); setAreaMultiplier(getAreaMultiplier()); setSolidAngleMultiplier(getSolidAngleMultiplier()); setHemisphereSamplingMode(getHemisphereSamplingMode()); setAlbedoEnabled(isAlbedoEnabled()); setAoEnabled(isAoEnabled()); setAmbientEnabled(isAmbientEnabled()); setDirectEnabled(isDirectEnabled()); setAoComputationId(getAoComputationId()); setAreaComputationId(getAreaComputationId()); setBlurEnabled(isBlurEnabled()); setBlurKdepth(getBlurKdepth()); setBlurKnormal(getBlurKnormal()); setBlurKernelSize(getBlurKernelSize()); setAlchemyK(getAlchemyK()); setAlchemyRO(getAlchemyRO()); setAlchemyU(getAlchemyU()); setTechnique(getTechnique()); reshape(winW, winH); }
void LightingModel::setAlbedo(bool enable) { if (enable != isAlbedoEnabled()) { _parametersBuffer.edit<Parameters>().enableAlbedo = (float)enable; } }