Ignore:
Timestamp:
Mar 23, 2006 12:48:39 PM (18 years ago)
Author:
qiaow
Message:

We can now tile multiple volumes in the scene using their starting locations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/vizservers/nanovis/shaders/one_volume.cg

    r373 r374  
    2525  float4 tex_coord = mul(modelViewInv, IN.TexCoord);
    2626       
    27   //float3 sample = tex3D(volume, tex_coord.xyz).xyz;
     27#if 1
     28  //1 component
    2829  float sample = tex3D(volume, tex_coord.xyz);
    2930
    30   if (sample < 0.) {
     31  if (sample.x < 0.) {
    3132      OUT.Color = float4(0.0, 0.0, 0.0, 0.0);
    3233  } else {
    3334      OUT.Color = float4(sample, sample, sample, sample/renderParameters.x);
    3435  }
     36#endif
     37
     38
     39#if 0
     40  //3 component
     41  float3 sample = tex3D(volume, tex_coord.xyz).xyz;
     42  OUT.Color = float4(3*sample, 2*length(sample)/renderParameters.x);
     43#endif
     44
     45//debug
     46//OUT.Color = float4(tex_coord, 1);
    3547
    3648  return OUT;
Note: See TracChangeset for help on using the changeset viewer.