18 lines
483 B
Plaintext
18 lines
483 B
Plaintext
uniform sampler2D _MainTex;
|
|
uniform sampler2D _RampTex;
|
|
varying vec2 varUV;
|
|
void main()
|
|
{
|
|
vec4 orig = texture2D (_MainTex, varUV);
|
|
|
|
// There was a bug where these three texture
|
|
// samples were "vectorized" in a wrong way, like
|
|
// t.xyz = texture2DProj (_RampTex, t.xyz).xyz;
|
|
|
|
float rr = texture2D (_RampTex, orig.xx).x;
|
|
float gg = texture2D (_RampTex, orig.yy).y;
|
|
float bb = texture2D (_RampTex, orig.zz).z;
|
|
vec4 color = vec4 (rr, gg, bb, orig.w);
|
|
gl_FragData[0] = color;
|
|
}
|