mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
+ | Better memory organising
This commit is contained in:
BIN
.objs/srcs/RT.o
Normal file
BIN
.objs/srcs/RT.o
Normal file
Binary file not shown.
BIN
.objs/srcs/class/Camera.o
Normal file
BIN
.objs/srcs/class/Camera.o
Normal file
Binary file not shown.
BIN
.objs/srcs/class/Scene.o
Normal file
BIN
.objs/srcs/class/Scene.o
Normal file
Binary file not shown.
BIN
.objs/srcs/class/SceneParser.o
Normal file
BIN
.objs/srcs/class/SceneParser.o
Normal file
Binary file not shown.
BIN
.objs/srcs/class/Shader.o
Normal file
BIN
.objs/srcs/class/Shader.o
Normal file
Binary file not shown.
BIN
.objs/srcs/class/Window.o
Normal file
BIN
.objs/srcs/class/Window.o
Normal file
Binary file not shown.
BIN
.objs/srcs/gl.o
Normal file
BIN
.objs/srcs/gl.o
Normal file
Binary file not shown.
@ -19,15 +19,16 @@ struct GPUObject
|
|||||||
{
|
{
|
||||||
alignas(16) glm::vec3 position;
|
alignas(16) glm::vec3 position;
|
||||||
|
|
||||||
int mat_index;
|
alignas(16) glm::vec3 normal; // plane triangle
|
||||||
|
|
||||||
float radius; // sphere
|
|
||||||
alignas(16) glm::vec3 normal; // plane
|
|
||||||
|
|
||||||
alignas(16) glm::vec3 vertex1; //quad triangle
|
alignas(16) glm::vec3 vertex1; //quad triangle
|
||||||
alignas(16) glm::vec3 vertex2; //quad triangle
|
alignas(16) glm::vec3 vertex2; //quad triangle
|
||||||
|
|
||||||
|
float radius; // sphere
|
||||||
|
|
||||||
|
int mat_index;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GPUMaterial
|
struct GPUMaterial
|
||||||
|
@ -7,14 +7,14 @@ layout(binding = 1, rgba32f) uniform image2D accumulation_image;
|
|||||||
struct GPUObject {
|
struct GPUObject {
|
||||||
vec3 position; // 12 + 4
|
vec3 position; // 12 + 4
|
||||||
|
|
||||||
int mat_index; // 4
|
|
||||||
|
|
||||||
float radius; // 4
|
|
||||||
vec3 normal; // 12 + 4
|
vec3 normal; // 12 + 4
|
||||||
|
|
||||||
vec3 vertex1; // 12 + 4
|
vec3 vertex1; // 12 + 4
|
||||||
vec3 vertex2; // 12 + 4
|
vec3 vertex2; // 12 + 4
|
||||||
|
|
||||||
|
float radius; // 4
|
||||||
|
|
||||||
|
int mat_index; // 4
|
||||||
int type; // 4
|
int type; // 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user