Untitled
Loading...
Searching...
No Matches
lightmap.vert File Reference

Go to the source code of this file.

Data Structures

struct  Mesh
 A Mesh with geometry data that is either initialized as static or dynamic and split into SubMeshes. More...

Functions

 layout (location=0) in vec3 aPos
 layout (std430, binding=6) buffer MeshData
void main ()

Variables

uniform int uMeshNode
out vec3 WorldPos
out vec3 WorldNormal
out vec2 vUV
out flat int TriID
out flat int MeshNode
out flat int MaterialID

Data Structure Documentation

◆ Mesh

struct Mesh

A Mesh with geometry data that is either initialized as static or dynamic and split into SubMeshes.

See also
MeshNode
Globals
init_mesh()

Definition at line 2484 of file engine_types.h.

Data Fields
char name[256] The Mesh name assigned on load.
size_t id The ID into Globals.meshes.
size_t asset_id The Asset ID into Globals.assets.
bool bvh_prim This Mesh has a BVH computed.
bool static_mesh This Mesh is static and must create a BVH or if not it must perform incremental_hull.
AABB aabb The AABB of the mesh.
size_t offset The offset into MAIN_VBO.
size_t count The count pushed into MAIN_VBO.
Vector submeshes The SubMeshes split via Materials.
Vector hulls The ConvexHulls generated if this Mesh is dynamic.
Vector vertices The Points.
Vector tris The MeshFaces.
TriangleAdjacency * tri_adjacency Adjacent triangles allocated per MeshFace.
size_t * bvh_indices Indices for the BVH, sorted as the BVH is generated.
Vector nodes BVHNodes.
Vector tri_aabbs AABBs for each triangle inside of this Mesh.
uint mesh_node_id
uint mesh_id
uint node_count
uint node_offset
uint vertex_offset
uint vertex_count
uint tri_offset
uint tri_count
uint bvh_index
uint is_static
uint pad0
uint pad1
mat4 global_matrix
mat4 inverse_global_matrix

Function Documentation

◆ layout() [1/2]

layout ( location = 0)

References layout().

◆ layout() [2/2]

layout ( std430 ,
binding = 6 )

Definition at line 31 of file lightmap.vert.

References layout().

◆ main()

void main ( )

Definition at line 49 of file lightmap.vert.

References main(), MaterialID, TriID, uMeshNode, vUV, WorldNormal, and WorldPos.

Variable Documentation

◆ uMeshNode

uniform int uMeshNode

Definition at line 38 of file lightmap.vert.

Referenced by main().

◆ WorldPos

out vec3 WorldPos

Definition at line 40 of file lightmap.vert.

◆ WorldNormal

out vec3 WorldNormal

Definition at line 41 of file lightmap.vert.

◆ vUV

out vec2 vUV

Definition at line 42 of file lightmap.vert.

◆ TriID

out flat int TriID

Definition at line 43 of file lightmap.vert.

◆ MeshNode

out flat int MeshNode

Definition at line 45 of file lightmap.vert.

◆ MaterialID

out flat int MaterialID

Definition at line 46 of file lightmap.vert.