mirror of
https://github.com/overte-org/overte.git
synced 2025-06-16 08:40:23 +02:00
back to noise seeded in image space
This commit is contained in:
parent
4097fcb0f6
commit
1e84f9dc90
2 changed files with 6 additions and 5 deletions
|
@ -44,9 +44,9 @@ void main(void) {
|
||||||
float ssDiskRadius = evalDiskRadius(Cp.z, imageSize);
|
float ssDiskRadius = evalDiskRadius(Cp.z, imageSize);
|
||||||
|
|
||||||
// Let's make noise
|
// Let's make noise
|
||||||
//float randomPatternRotationAngle = getAngleDithering(ssC);
|
float randomPatternRotationAngle = getAngleDithering(ssC);
|
||||||
vec3 wCp = (getViewInverse() * vec4(Cp, 1.0)).xyz;
|
//vec3 wCp = (getViewInverse() * vec4(Cp, 1.0)).xyz;
|
||||||
float randomPatternRotationAngle = getAngleDitheringWorldPos(wCp);
|
//float randomPatternRotationAngle = getAngleDitheringWorldPos(wCp);
|
||||||
|
|
||||||
// Accumulate the Obscurance for each samples
|
// Accumulate the Obscurance for each samples
|
||||||
float sum = 0.0;
|
float sum = 0.0;
|
||||||
|
@ -62,7 +62,7 @@ void main(void) {
|
||||||
|
|
||||||
float A = max(0.0, 1.0 - sum * getObscuranceScaling() * 5.0 * getInvNumSamples());
|
float A = max(0.0, 1.0 - sum * getObscuranceScaling() * 5.0 * getInvNumSamples());
|
||||||
|
|
||||||
<! // KEEP IT for Debugging
|
// KEEP IT for Debugging
|
||||||
// Bilateral box-filter over a quad for free, respecting depth edges
|
// Bilateral box-filter over a quad for free, respecting depth edges
|
||||||
// (the difference that this makes is subtle)
|
// (the difference that this makes is subtle)
|
||||||
if (abs(dFdx(Cp.z)) < 0.02) {
|
if (abs(dFdx(Cp.z)) < 0.02) {
|
||||||
|
@ -71,7 +71,7 @@ void main(void) {
|
||||||
if (abs(dFdy(Cp.z)) < 0.02) {
|
if (abs(dFdy(Cp.z)) < 0.02) {
|
||||||
A -= dFdy(A) * ((ssC.y & 1) - 0.5);
|
A -= dFdy(A) * ((ssC.y & 1) - 0.5);
|
||||||
}
|
}
|
||||||
!>
|
|
||||||
|
|
||||||
outFragColor = vec4(packOcclusionDepth(A, CSZToDephtKey(Cp.z)), 1.0);
|
outFragColor = vec4(packOcclusionDepth(A, CSZToDephtKey(Cp.z)), 1.0);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Column {
|
||||||
"Num Taps:numSamples:32:true",
|
"Num Taps:numSamples:32:true",
|
||||||
"Taps Spiral:numSpiralTurns:10.0:false",
|
"Taps Spiral:numSpiralTurns:10.0:false",
|
||||||
"Falloff Bias:falloffBias:0.2:false",
|
"Falloff Bias:falloffBias:0.2:false",
|
||||||
|
"Edge Sharpness:edgeSharpness:1.0:false",
|
||||||
"Blur Radius:blurRadius:10.0:false",
|
"Blur Radius:blurRadius:10.0:false",
|
||||||
]
|
]
|
||||||
ConfigSlider {
|
ConfigSlider {
|
||||||
|
|
Loading…
Reference in a new issue