10 lines
242 B
Plaintext
10 lines
242 B
Plaintext
|
|
||
|
vec3 localToWorld( vec3 _VERTEX, mat4 _MODEL_MATRIX )
|
||
|
{
|
||
|
return ( _MODEL_MATRIX * vec4( _VERTEX, 1.0 ) ).xyz;
|
||
|
}
|
||
|
|
||
|
vec3 worldToLocal( vec3 _VERTEX, mat4 _MODEL_MATRIX )
|
||
|
{
|
||
|
return ( inverse( _MODEL_MATRIX ) * vec4( _VERTEX, 1.0 ) ).xyz;
|
||
|
}
|