mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 11:53:28 +02:00
Small changes
This commit is contained in:
parent
c167a71129
commit
7a736043a6
3 changed files with 3 additions and 13 deletions
|
@ -186,7 +186,7 @@ void AmbientOcclusionEffect::configure(const Config& config) {
|
|||
|
||||
if (config.obscuranceLevel != _parametersBuffer->getObscuranceLevel()) {
|
||||
auto& current = _parametersBuffer.edit().radiusInfo;
|
||||
current.w = config.obscuranceLevel;
|
||||
current.w = config.obscuranceLevel * 10.0;
|
||||
}
|
||||
|
||||
if (config.falloffBias != _parametersBuffer->getFalloffBias()) {
|
||||
|
@ -343,12 +343,6 @@ void AmbientOcclusionEffect::run(const render::RenderContextPointer& renderConte
|
|||
|
||||
auto framebufferSize = _framebuffer->getSourceFrameSize();
|
||||
|
||||
float sMin = occlusionViewport.x / (float)framebufferSize.x;
|
||||
float sWidth = occlusionViewport.z / (float)framebufferSize.x;
|
||||
float tMin = occlusionViewport.y / (float)framebufferSize.y;
|
||||
float tHeight = occlusionViewport.w / (float)framebufferSize.y;
|
||||
|
||||
|
||||
auto occlusionPipeline = getOcclusionPipeline();
|
||||
auto firstHBlurPipeline = getHBlurPipeline();
|
||||
auto lastVBlurPipeline = getVBlurPipeline();
|
||||
|
@ -373,10 +367,6 @@ void AmbientOcclusionEffect::run(const render::RenderContextPointer& renderConte
|
|||
batch.generateTextureMipsWithPipeline(_framebuffer->getLinearDepthTexture());
|
||||
batch.popProfileRange();
|
||||
|
||||
model.setTranslation(glm::vec3(sMin, tMin, 0.0f));
|
||||
model.setScale(glm::vec3(sWidth, tHeight, 1.0f));
|
||||
batch.setModelTransform(model);
|
||||
|
||||
batch.setUniformBuffer(render_utils::slot::buffer::DeferredFrameTransform, frameTransform->getFrameTransformBuffer());
|
||||
batch.setUniformBuffer(render_utils::slot::buffer::SsaoParams, _parametersBuffer);
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ vec2 fetchOcclusionDepth(ivec2 coords) {
|
|||
|
||||
const int RADIUS_SCALE = 1;
|
||||
const float BLUR_WEIGHT_OFFSET = 0.05;
|
||||
const float BLUR_EDGE_SCALE = 2000.0;
|
||||
const float BLUR_EDGE_SCALE = 5000.0;
|
||||
|
||||
vec2 evalTapWeightedValue(ivec3 side, int r, ivec2 ssC, float key) {
|
||||
ivec2 tapOffset = <$axis$> * (r * RADIUS_SCALE);
|
||||
|
|
|
@ -64,7 +64,7 @@ void main(void) {
|
|||
#endif
|
||||
}
|
||||
|
||||
float occlusion = max(0.0, 1.0 - visibilitySum * getObscuranceScaling() * 5.0 * getInvNumSamples());
|
||||
float occlusion = clamp(1.0 - visibilitySum * getObscuranceScaling() * getInvNumSamples(), 0.0, 1.0);
|
||||
|
||||
// KEEP IT for Debugging
|
||||
// Bilateral box-filter over a quad for free, respecting depth edges
|
||||
|
|
Loading…
Reference in a new issue