mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-25 04:32:33 -06:00
20 lines
512 B
Text
20 lines
512 B
Text
//Cg
|
|
|
|
void vshader(float4 vtx_position : POSITION,
|
|
uniform float4x4 mat_modelproj,
|
|
uniform float4 k_scale,
|
|
out float4 l_position : POSITION,
|
|
out float4 l_pos : TEXCOORD0
|
|
)
|
|
{
|
|
float4 position = vtx_position * k_scale;
|
|
l_pos = mul(mat_modelproj, position);
|
|
l_position = l_pos;
|
|
}
|
|
|
|
void fshader(in float4 l_pos : TEXCOORD0,
|
|
out float4 o_color : COLOR)
|
|
{
|
|
float z = (l_pos.z / l_pos.w) * 0.5 + 0.5;
|
|
o_color = float4(z, z, z, 1);
|
|
}
|