32 #include <texture_reference.h> 48 #define TEX_COORD_COMPRESSION_FIXED 0 49 #define TEX_COORD_COMPRESSION_HALF 1 50 #define TEX_COORD_COMPRESSION_MODE TEX_COORD_COMPRESSION_HALF 64 float index_of_refraction;
79 material.diffuse = make_float4(0.0f,0.0f,0.0f,0.0f);
80 material.diffuse_trans = make_float4(0.0f,0.0f,0.0f,0.0f);
81 material.ambient = make_float4(0.0f,0.0f,0.0f,0.0f);
82 material.specular = make_float4(0.0f,0.0f,0.0f,0.0f);
83 material.emissive = make_float4(0.0f,0.0f,0.0f,0.0f);
84 material.reflectivity = make_float4(0.0f,0.0f,0.0f,0.0f);
85 material.roughness = 0.0f;
86 material.index_of_refraction = 1.0f;
87 material.opacity = 1.0f;
98 static const uint32 VERTEX_TRIANGLE_SIZE = 4;
99 static const uint32 NORMAL_TRIANGLE_SIZE = 4;
100 static const uint32 TEXTURE_TRIANGLE_SIZE = 4;
101 static const uint32 LIGHTMAP_TRIANGLE_SIZE = 4;
103 typedef int4 vertex_triangle;
104 typedef int4 normal_triangle;
105 typedef int4 texture_triangle;
106 typedef int4 lightmap_triangle;
108 typedef float4 vertex_type;
109 typedef float3 normal_type;
110 typedef float2 texture_coord_type;
114 int num_texture_coordinates;
131 int* normal_indices_comp;
132 int* material_indices;
133 int* texture_indices;
134 int* texture_indices_comp;
138 uint32* normal_data_comp;
140 int* lightmap_indices;
141 int* lightmap_indices_comp;
142 float* lightmap_data;
149 FERMAT_HOST_DEVICE FERMAT_FORCEINLINE
152 return reinterpret_cast<const MeshView::vertex_type*
>(mesh.vertex_data)[vert_idx];
157 FERMAT_HOST_DEVICE FERMAT_FORCEINLINE
160 return reinterpret_cast<const MeshView::normal_type*
>(mesh.normal_data)[vert_idx];
165 FERMAT_HOST_DEVICE FERMAT_FORCEINLINE
168 return reinterpret_cast<const MeshView::texture_coord_type*
>(mesh.texture_data)[vert_idx];
Definition: texture_reference.h:41
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE const MeshView::normal_type & fetch_normal(const MeshView &mesh, const uint32 vert_idx)
Definition: MeshView.h:158
Definition: MeshView.h:55
Definition: MeshView.h:96
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE const MeshView::vertex_type & fetch_vertex(const MeshView &mesh, const uint32 vert_idx)
Definition: MeshView.h:150
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE const MeshView::texture_coord_type & fetch_tex_coord(const MeshView &mesh, const uint32 vert_idx)
Definition: MeshView.h:166