Commit 08791305 authored by Michael Migliore's avatar Michael Migliore
Browse files

Use texture LOD level 0 when drawing skybox

parent 8ff61aec
Pipeline #263693 failed with stages
......@@ -143,7 +143,7 @@ void vtkOpenGLSkybox::Render(vtkRenderer* ren, vtkMapper* mapper)
" vec3 dirv = vec3(dot(diri,floorRight),\n"
" dot(diri,floorPlane.xyz),\n"
" dot(diri,floorFront));\n"
" vec4 color = texture(actortexture, dirv);\n"
" vec4 color = textureLod(actortexture, dirv, 0.0);\n"
"//VTK::Gamma::Impl\n");
}
if (this->Projection == vtkSkybox::Sphere)
......@@ -162,7 +162,7 @@ void vtkOpenGLSkybox::Render(vtkRenderer* ren, vtkMapper* mapper)
" dot(diri,floorFront));\n"
" float phix = length(vec2(dirv.x, dirv.z));\n"
" vec4 color = textureLod(actortexture, vec2(0.5*atan(dirv.x, "
"dirv.z)/3.1415927 + 0.5, atan(dirv.y,phix)/3.1415927 + 0.5), 1.0);\n"
"dirv.z)/3.1415927 + 0.5, atan(dirv.y,phix)/3.1415927 + 0.5), 0.0);\n"
"//VTK::Gamma::Impl\n");
}
if (this->Projection == vtkSkybox::StereoSphere)
......@@ -182,7 +182,7 @@ void vtkOpenGLSkybox::Render(vtkRenderer* ren, vtkMapper* mapper)
" dot(diri,floorFront));\n"
" float phix = length(vec2(dirv.x, dirv.z));\n"
" vec4 color = textureLod(actortexture, vec2(0.5*atan(dirv.x, dirv.z)/3.1415927 + "
"0.5, 0.5*atan(dirv.y,phix)/3.1415927 + 0.25 + 0.5*leftEye), 1.0);\n"
"0.5, 0.5*atan(dirv.y,phix)/3.1415927 + 0.25 + 0.5*leftEye), 0.0);\n"
"//VTK::Gamma::Impl\n");
}
if (this->Projection == vtkSkybox::Floor)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment