diff --git a/src/osgVolume/Shaders/volume_frag.cpp b/src/osgVolume/Shaders/volume_frag.cpp index 8f57ffced..0dc54a573 100644 --- a/src/osgVolume/Shaders/volume_frag.cpp +++ b/src/osgVolume/Shaders/volume_frag.cpp @@ -71,13 +71,12 @@ char volume_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_iso_frag.cpp b/src/osgVolume/Shaders/volume_iso_frag.cpp index f062ed19f..77edbeeb2 100644 --- a/src/osgVolume/Shaders/volume_iso_frag.cpp +++ b/src/osgVolume/Shaders/volume_iso_frag.cpp @@ -71,13 +71,12 @@ char volume_iso_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(t0-te).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = te.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_lit_frag.cpp b/src/osgVolume/Shaders/volume_lit_frag.cpp index 5263e81ed..ef1ecc1d9 100644 --- a/src/osgVolume/Shaders/volume_lit_frag.cpp +++ b/src/osgVolume/Shaders/volume_lit_frag.cpp @@ -71,13 +71,12 @@ char volume_lit_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_lit_tf_frag.cpp b/src/osgVolume/Shaders/volume_lit_tf_frag.cpp index 662f15bad..9f1b5cd63 100644 --- a/src/osgVolume/Shaders/volume_lit_tf_frag.cpp +++ b/src/osgVolume/Shaders/volume_lit_tf_frag.cpp @@ -78,13 +78,12 @@ char volume_lit_tf_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_mip_frag.cpp b/src/osgVolume/Shaders/volume_mip_frag.cpp index 73b6468df..b3f3c03a8 100644 --- a/src/osgVolume/Shaders/volume_mip_frag.cpp +++ b/src/osgVolume/Shaders/volume_mip_frag.cpp @@ -70,13 +70,12 @@ char volume_mip_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_tf_frag.cpp b/src/osgVolume/Shaders/volume_tf_frag.cpp index 46bae8c44..81dc92e41 100644 --- a/src/osgVolume/Shaders/volume_tf_frag.cpp +++ b/src/osgVolume/Shaders/volume_tf_frag.cpp @@ -75,13 +75,12 @@ char volume_tf_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_tf_iso_frag.cpp b/src/osgVolume/Shaders/volume_tf_iso_frag.cpp index 2df672f4f..8a029e41c 100644 --- a/src/osgVolume/Shaders/volume_tf_iso_frag.cpp +++ b/src/osgVolume/Shaders/volume_tf_iso_frag.cpp @@ -76,13 +76,12 @@ char volume_tf_iso_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(t0-te).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = te.xyz;\n" diff --git a/src/osgVolume/Shaders/volume_tf_mip_frag.cpp b/src/osgVolume/Shaders/volume_tf_mip_frag.cpp index 2aaea2201..91290dfbd 100644 --- a/src/osgVolume/Shaders/volume_tf_mip_frag.cpp +++ b/src/osgVolume/Shaders/volume_tf_mip_frag.cpp @@ -75,13 +75,12 @@ char volume_tf_mip_frag[] = "#version 110\n" "\n" " float num_iterations = ceil(length((te-t0).xyz)/SampleDensityValue);\n" "\n" - " #ifdef NVIDIA_Corporation\n" - " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" - " if (num_iterations!=num_iterations) num_iterations = min_iteratrions;\n" - " #endif\n" - "\n" " if (num_iterationsmax_iteratrions) num_iterations = max_iteratrions;\n" + " #ifdef NVIDIA_Corporation\n" + " // Recent NVidia drivers have a bug in length() where it throws nan for some values of input into length() so catch these\n" + " else if (num_iterations!=num_iterations) num_iterations = max_iteratrions;\n" + " #endif\n" "\n" " vec3 deltaTexCoord=(te-t0).xyz/float(num_iterations-1.0);\n" " vec3 texcoord = t0.xyz;\n"