mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 21:02:50 +00:00
fde1ef0159
The grid calculations are modified from those of Inigo Quilez (https://iquilezles.org/articles/filterableprocedurals/), but give very nice results: when thin enough, the lines fade out nicely instead of producing crazy moire patterns. Though currently disabled, the default planes are the xy, yz and zx planes with colored axes.
5 lines
109 B
Text
5 lines
109 B
Text
vec4 plane_st (mat3 plane, mat3 cam, vec3 vec)
|
|
{
|
|
vec3 i = plane * (cam * vec);
|
|
return vec4 (i/i.z, i.z);
|
|
}
|