Skip to content
Snippets Groups Projects
Commit b26d62a0 authored by Alexander Rose's avatar Alexander Rose
Browse files

webgl1 compat

parent 926d6cbd
Branches
Tags
No related merge requests found
......@@ -74,7 +74,7 @@ void main(void) {
float kernelSum = 0.0;
// only if kernelSize is odd
for (int i = -dOcclusionKernelSize / 2; i <= dOcclusionKernelSize / 2; i++) {
if (abs(i) > 1 && abs(float(i)) * pixelSize > 0.5) continue;
if (abs(float(i)) > 1.0 && abs(float(i)) * pixelSize > 0.5) continue;
vec2 sampleCoords = coords + float(i) * offset;
if (outsideBounds(sampleCoords)) {
......@@ -88,7 +88,7 @@ void main(void) {
continue;
}
if (abs(float(i)) > 1.0) { // abs is not defined for int in webgl1
if (abs(float(i)) > 1.0) {
float sampleViewZ = getViewZ(sampleDepth);
if (abs(selfViewZ - sampleViewZ) > maxDiffViewZ) {
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment