| 1 |
R"XXX(#version 300 es |
| 2 |
|
| 3 |
// VERTEX SHADER: Default shader for MRPT CRenderizable objects |
| 4 |
// Jose Luis Blanco Claraco (C) 2019-2023 |
| 5 |
// Part of the MRPT project |
| 6 |
|
| 7 |
in vec3 position; |
| 8 |
out highp vec3 TexCoords; |
| 9 |
|
| 10 |
uniform highp mat4 p_matrix, v_matrix_no_translation; |
| 11 |
|
| 12 |
void main() |
| 13 |
{ |
| 14 |
highp vec4 pos = p_matrix * v_matrix_no_translation * vec4(position, 1.0); |
| 15 |
// (x,y,w,w), such that depth z/w=1 |
| 16 |
gl_Position = pos.xyww; |
| 17 |
|
| 18 |
// This change of coordinates is required to have sky boxes in their place: |
| 19 |
TexCoords = vec3(position.x,position.z,position.y); |
| 20 |
} |
| 21 |
)XXX" |