Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 4fa2d28e authored by MURRAY David's avatar MURRAY David
Browse files

use float access to indices tex in intersection program

parent c44d332d
......@@ -141,9 +141,7 @@ static __device__ void meshIntersect(int primIdx)
if(index_tex_id > -1 && texcoord_buffer.size() >= 0)
{
float2 uv = make_float2(texcoord.x - floorf(texcoord.x), texcoord.y - floorf(texcoord.y));
uint2 tex_size = make_uint2(optix::rtTexSize(index_tex_id));
uint2 uvi = make_uint2(uv * make_float2(tex_size));
float indexf = optix::rtTex2DFetch<float4>(index_tex_id, uvi.x, uvi.y).x;
float indexf = optix::rtTex2D<float4>(index_tex_id, uv.x, 1.f - uv.y).x;
index = indexf * 255;
}
rtReportIntersection(index);
......
Markdown is supported
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