Загрузчик двоичных ресурсов на сервере (Alpha)
This commit is contained in:
@@ -11,16 +11,20 @@ layout(location = 0) in GeometryObj {
|
||||
|
||||
layout(location = 0) out FragmentObj {
|
||||
vec3 GeoPos; // Реальная позиция в мире
|
||||
vec3 Normal;
|
||||
flat uint Texture; // Текстура
|
||||
vec2 UV;
|
||||
} Fragment;
|
||||
|
||||
void main() {
|
||||
vec3 normal = normalize(cross(Geometry[1].GeoPos-Geometry[0].GeoPos, Geometry[2].GeoPos-Geometry[0].GeoPos));
|
||||
|
||||
for(int iter = 0; iter < 3; iter++) {
|
||||
gl_Position = gl_in[iter].gl_Position;
|
||||
Fragment.GeoPos = Geometry[iter].GeoPos;
|
||||
Fragment.Texture = Geometry[iter].Texture;
|
||||
Fragment.UV = Geometry[iter].UV;
|
||||
Fragment.Normal = normal;
|
||||
EmitVertex();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user