[4] | 1 | /*--------------------------------------------------------------------------*/ |
---|
| 2 | /* Volume Rendering Application */ |
---|
| 3 | /* Copyright (C) 2006-2007 Nicholas Schwarz */ |
---|
| 4 | /* */ |
---|
| 5 | /* This software is free software; you can redistribute it and/or modify it */ |
---|
| 6 | /* under the terms of the GNU Lesser General Public License as published by */ |
---|
| 7 | /* the Free Software Foundation; either Version 2.1 of the License, or */ |
---|
| 8 | /* (at your option) any later version. */ |
---|
| 9 | /* */ |
---|
| 10 | /* This software is distributed in the hope that it will be useful, but */ |
---|
| 11 | /* WITHOUT ANY WARRANTY; without even the implied warranty of */ |
---|
| 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser */ |
---|
| 13 | /* General Public License for more details. */ |
---|
| 14 | /* */ |
---|
| 15 | /* You should have received a copy of the GNU Lesser Public License along */ |
---|
| 16 | /* with this library; if not, write to the Free Software Foundation, Inc., */ |
---|
| 17 | /* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ |
---|
| 18 | /*--------------------------------------------------------------------------*/ |
---|
| 19 | |
---|
| 20 | void Fragment(in float3 inTex : TEXCOORD0, |
---|
| 21 | out float4 outColor : COLOR0, |
---|
| 22 | const uniform sampler3D DataTexture, |
---|
| 23 | const uniform sampler2D MapTexture) { |
---|
| 24 | |
---|
| 25 | float2 val = tex3D(DataTexture, inTex).ar; |
---|
| 26 | outColor = tex2D(MapTexture, val); |
---|
| 27 | |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | /*--------------------------------------------------------------------------*/ |
---|