| 799 | | " texcoord = gl_MultiTexCoord0.xyz;\n" |
| 800 | | " gl_Position = ftransform(); \n" |
| 801 | | " deltaTexCoord = normalize(gl_ModelViewMatrixInverse * vec4(0,0,0,1) - gl_Vertex);\n" |
| | 799 | " texcoord = gl_MultiTexCoord0.xyz;\n" |
| | 800 | " gl_Position = ftransform();\n" |
| | 801 | " cameraPos=vec4(gl_ModelViewMatrixInverse*vec4(0,0,0,1)).xyz;\n" |
| 829 | | " vec3 deltaTexCoord2 = normalize(deltaTexCoord)*sampleDensity; \n" |
| 830 | | "\n" |
| 831 | | " gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); \n" |
| 832 | | " \n" |
| 833 | | " while (texcoord.x>=0.0 && texcoord.x<=1.0 &&\n" |
| 834 | | " texcoord.y>=0.0 && texcoord.y<=1.0 &&\n" |
| 835 | | " texcoord.z>=0.0 && texcoord.z<=1.0)\n" |
| 836 | | " {\n" |
| 837 | | " vec4 color = texture3D( baseTexture, texcoord);\n" |
| 838 | | " float r = color[3]*transparency;\n" |
| 839 | | " if (r>alphaCutOff)\n" |
| 840 | | " {\n" |
| 841 | | " gl_FragColor.xyz = gl_FragColor.xyz*(1.0-r)+color.xyz*r;\n" |
| 842 | | " gl_FragColor.w += r;\n" |
| 843 | | " }\n" |
| 844 | | " texcoord += deltaTexCoord2; \n" |
| 845 | | " }\n" |
| | 830 | " vec3 deltaTexCoord=normalize(cameraPos-texcoord.xyz)*sampleDensity;\n" |
| | 831 | " gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); \n" |
| | 832 | " while (texcoord.x>=0.0 && texcoord.x<=1.0 &&\n" |
| | 833 | " texcoord.y>=0.0 && texcoord.y<=1.0 &&\n" |
| | 834 | " texcoord.z>=0.0 && texcoord.z<=1.0)\n" |
| | 835 | " {\n" |
| | 836 | " vec4 color = texture3D( baseTexture, texcoord);\n" |
| | 837 | " float r = color[3]*transparency;\n" |
| | 838 | " if (r>alphaCutOff)\n" |
| | 839 | " {\n" |
| | 840 | " gl_FragColor.xyz = gl_FragColor.xyz*(1.0-r)+color.xyz*r;\n" |
| | 841 | " gl_FragColor.w += r;\n" |
| | 842 | " }\n" |
| | 843 | " texcoord += deltaTexCoord; \n" |
| | 844 | " }\n" |