mirror of
https://github.com/panda3d/panda3d.git
synced 2026-04-29 11:10:18 -05:00
22 lines
561 B
Plaintext
22 lines
561 B
Plaintext
//Cg
|
|
//
|
|
|
|
void vshader(float4 vtx_position : POSITION,
|
|
float2 vtx_texcoord0 : TEXCOORD0,
|
|
uniform float4x4 mat_modelproj,
|
|
out float4 l_position : POSITION,
|
|
out float2 l_texcoord0 : TEXCOORD0)
|
|
{
|
|
l_position = mul(mat_modelproj, vtx_position);
|
|
l_texcoord0 = vtx_texcoord0;
|
|
}
|
|
|
|
void fshader(float2 l_texcoord0 : TEXCOORD0,
|
|
uniform sampler2D tex_0 : TEXUNIT0,
|
|
out float4 o_color : COLOR)
|
|
{
|
|
float4 texColor = tex2D(tex_0, l_texcoord0);
|
|
o_color = texColor * 2 * (texColor.w - 0.5);
|
|
}
|
|
|