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

webgl1 compat

parent 926d6cbd
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ void main(void) { ...@@ -74,7 +74,7 @@ void main(void) {
float kernelSum = 0.0; float kernelSum = 0.0;
// only if kernelSize is odd // only if kernelSize is odd
for (int i = -dOcclusionKernelSize / 2; i <= dOcclusionKernelSize / 2; i++) { 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; vec2 sampleCoords = coords + float(i) * offset;
if (outsideBounds(sampleCoords)) { if (outsideBounds(sampleCoords)) {
...@@ -88,7 +88,7 @@ void main(void) { ...@@ -88,7 +88,7 @@ void main(void) {
continue; 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); float sampleViewZ = getViewZ(sampleDepth);
if (abs(selfViewZ - sampleViewZ) > maxDiffViewZ) { if (abs(selfViewZ - sampleViewZ) > maxDiffViewZ) {
continue; continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment