* | Push for render sponza on server
BIN
output.path
@ -1,158 +1,131 @@
|
||||
# Aspose.3D Wavefront OBJ Exporter
|
||||
# Copyright 2004-2024 Aspose Pty Ltd.
|
||||
# File created: 01/29/2025 16:07:20
|
||||
# File created: 02/09/2025 15:12:04
|
||||
|
||||
newmtl mat0_Ears
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Ears_color.png
|
||||
map_Pr mat0_Ears_metallic.png
|
||||
map_Pm mat0_Ears_metallic.png
|
||||
map_Kd textures/mat0_Ears_baseColor.png
|
||||
newmtl mat0_Chest
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Chest_color.png
|
||||
map_Pr mat0_Chest_metallic.png
|
||||
map_Pm mat0_Chest_metallic.png
|
||||
map_Kd textures/mat0_Chest_baseColor.png
|
||||
newmtl mat0_Hair
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Hair_color.png
|
||||
map_Pr mat0_Hair_metallic.png
|
||||
map_Pm mat0_Hair_metallic.png
|
||||
map_Kd textures/mat0_Hair_baseColor.png
|
||||
newmtl mat0_Head
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Head_color.png
|
||||
map_Pr mat0_Head_metallic.png
|
||||
map_Pm mat0_Head_metallic.png
|
||||
map_Kd textures/mat0_Head_baseColor.png
|
||||
newmtl mat0_Eyes
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Eyes_color.png
|
||||
map_Pr mat0_Eyes_metallic.png
|
||||
map_Pm mat0_Eyes_metallic.png
|
||||
map_Kd textures/mat0_Eyes_baseColor.png
|
||||
newmtl mat0_Teeth
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Teeth_color.png
|
||||
map_Pr mat0_Teeth_metallic.png
|
||||
map_Pm mat0_Teeth_metallic.png
|
||||
map_Kd textures/mat0_Teeth_baseColor.png
|
||||
newmtl mat0_Bangs
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Bangs_color.png
|
||||
map_Pr mat0_Bangs_metallic.png
|
||||
map_Pm mat0_Bangs_metallic.png
|
||||
map_Kd textures/mat0_Bangs_baseColor.png
|
||||
newmtl mat0_Hair_Bracelet_2
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Hair_Bracelet_2_color.png
|
||||
map_Pr mat0_Hair_Bracelet_2_metallic.png
|
||||
map_Pm mat0_Hair_Bracelet_2_metallic.png
|
||||
map_Kd textures/mat0_Hair_Bracelet_2_baseColor.png
|
||||
newmtl mat0_Pin
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Pin_color.png
|
||||
map_Pr mat0_Pin_metallic.png
|
||||
map_Pm mat0_Pin_metallic.png
|
||||
map_Kd textures/mat0_Pin_baseColor.png
|
||||
newmtl mat0_Braids
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Braids_color.png
|
||||
map_Pr mat0_Braids_metallic.png
|
||||
map_Pm mat0_Braids_metallic.png
|
||||
map_Kd textures/mat0_Braids_baseColor.png
|
||||
newmtl mat0_Lashes
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Lashes_color.png
|
||||
map_Pr mat0_Lashes_metallic.png
|
||||
map_Pm mat0_Lashes_metallic.png
|
||||
map_Kd textures/mat0_Lashes_baseColor.png
|
||||
newmtl mat0_FX
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Ke 1 1 0.29737428
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_FX_color.png
|
||||
map_Pr mat0_FX_metallic.png
|
||||
map_Pm mat0_FX_metallic.png
|
||||
map_Kd textures/mat0_FX_baseColor.png
|
||||
newmtl mat0_Blast
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Ke 1 1 1
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_Blast_color.png
|
||||
map_Pr mat0_Blast_metallic.png
|
||||
map_Pm mat0_Blast_metallic.png
|
||||
map_Kd textures/mat0_Blast_baseColor.png
|
||||
map_Ke textures/mat0_Blast_baseColor.png
|
||||
newmtl mat0_BG
|
||||
illum 2
|
||||
Kd 1 1 1
|
||||
Ke 0 0 0
|
||||
Pr 0
|
||||
Pm 0
|
||||
Pr 1
|
||||
Pm 1
|
||||
d 1
|
||||
Tr 0
|
||||
map_Kd textures/mat0_BG_color.png
|
||||
map_Pr mat0_BG_metallic.png
|
||||
map_Pm mat0_BG_metallic.png
|
||||
map_Kd textures/mat0_BG_baseColor.png
|
||||
|
1043614
scenes/obj/jinx.obj
BIN
scenes/obj/textures/mat0_BG_baseColor.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 2.5 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Bangs_baseColor.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Blast_baseColor.png
Normal file
After Width: | Height: | Size: 1.4 MiB |
Before Width: | Height: | Size: 1.8 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Braids_baseColor.png
Normal file
After Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 3.0 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Chest_baseColor.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Ears_baseColor.png
Normal file
After Width: | Height: | Size: 878 KiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Eyes_baseColor.png
Normal file
After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 235 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_FX_baseColor.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Hair_Bracelet_2_baseColor.png
Normal file
After Width: | Height: | Size: 712 KiB |
Before Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Hair_baseColor.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
Before Width: | Height: | Size: 2.4 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Head_baseColor.png
Normal file
After Width: | Height: | Size: 880 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Lashes_baseColor.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Pin_baseColor.png
Normal file
After Width: | Height: | Size: 412 KiB |
Before Width: | Height: | Size: 650 KiB |
Before Width: | Height: | Size: 22 KiB |
BIN
scenes/obj/textures/mat0_Teeth_baseColor.png
Normal file
After Width: | Height: | Size: 382 KiB |
Before Width: | Height: | Size: 573 KiB |
Before Width: | Height: | Size: 22 KiB |
@ -20,8 +20,8 @@ OBJ obj/Dragon_80K.obj 9 1.35 -3.5 5 0 40 0 1
|
||||
OBJ obj/Dragon_800K.obj 10 3.35 -3.5 45 0 230 0 0
|
||||
# OBJ obj/Dragon_80K.obj 9 1.35 -3.5 5 0 40 0 1
|
||||
|
||||
OBJ obj/jinx.obj 2.5 14.0 -10.5 2.0
|
||||
OBJ obj/jinx.obj 2.5 14.0 10.5 2.0 0 -180 0
|
||||
OBJ obj/jinx.obj 2.5 14.0 -10.5 2.0 0 -90 0
|
||||
OBJ obj/jinx.obj 2.5 14.0 10.5 2.0 0 90 0
|
||||
|
||||
po 31 13 -13 0 3 0 0 0 3 1 3
|
||||
po -34 13 -13 0 3 0 0 0 3 0 4
|
||||
|
@ -1,19 +1,9 @@
|
||||
CAM 0 1.3733 2.83437 -16 -87.8001 0 1 90 5
|
||||
|
||||
# MAT 255 255 255 0.0 1.5 0.0 DIE -1 // 0
|
||||
# sp 0 0 0 12.5 0
|
||||
|
||||
TEX skymap.hdr
|
||||
MAT 255 255 255 100.0 0.0 0.0 // 1
|
||||
MAT 255 255 255 1.0 0.0 0.0 LAM 0 // 0
|
||||
|
||||
MAT 255 255 255 0.0 0.0 0.0 // 1
|
||||
# sp 0 2 0 150 1
|
||||
|
||||
|
||||
sp 0 2 0 150 0
|
||||
|
||||
#OBJ obj/jinx.obj -10 0 0 1.25 0 0 0
|
||||
# OBJ obj/Dragon_800K.obj 0 0 0 35 0 0 0 1
|
||||
|
||||
#OBJ obj/whitedragon.obj 0 0 0 1 0 0 0
|
||||
#O
|
||||
OBJ obj/texturedMesh.obj 0 0 0 1 0
|
||||
OBJ obj/train.obj 0 0 0 0.1 0
|
||||
|
@ -202,10 +202,10 @@ vec3[2] pathtrace(Ray ray, inout uint rng_state)
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
imageStore(normal_texture, ivec2(gl_GlobalInvocationID.xy), vec4(normalize(hit.normal), 1.0));
|
||||
imageStore(position_texture, ivec2(gl_GlobalInvocationID.xy), vec4(normalize(hit.position), 1.0));
|
||||
// vec4 accum_normal = accumulate(normal_texture, accum_normal, normalize(hit.normal));
|
||||
// vec4 accum_position = accumulate(position_texture, accum_position, normalize(hit.position));
|
||||
// imageStore(normal_texture, ivec2(gl_GlobalInvocationID.xy), vec4(normalize(hit.normal), 1.0));
|
||||
// imageStore(position_texture, ivec2(gl_GlobalInvocationID.xy), vec4(normalize(hit.position), 1.0));
|
||||
vec4 accum_normal = accumulate(normal_texture, accum_normal, normalize(hit.normal));
|
||||
vec4 accum_position = accumulate(position_texture, accum_position, normalize(hit.position));
|
||||
}
|
||||
|
||||
float p = max(color.r, max(color.g, color.b));
|
||||
|
15
srcs/RT.cpp
@ -38,22 +38,13 @@ int main(int argc, char **argv)
|
||||
setupScreenTriangle(&VAO);
|
||||
|
||||
std::vector<GLuint> textures = generateTextures(8);
|
||||
//0 output
|
||||
//1 output_accumulation
|
||||
//2 denoising
|
||||
//3 normal
|
||||
//4 position
|
||||
//5 light
|
||||
//6 light_accum
|
||||
//7 color
|
||||
|
||||
|
||||
|
||||
ShaderProgram raytracing_program;
|
||||
Shader compute = Shader(GL_COMPUTE_SHADER, "shaders/compute.glsl");
|
||||
int maxTextureUnits; glGetIntegerv(GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS, &maxTextureUnits);
|
||||
compute.setDefine("TEXTURE_MAX", std::to_string(maxTextureUnits / 2));
|
||||
compute.reload();
|
||||
std::cout << "Max texture units: " << maxTextureUnits << std::endl;
|
||||
// compute.setDefine("TEXTURE_MAX", std::to_string(maxTextureUnits / 2));
|
||||
// compute.reload();
|
||||
raytracing_program.attachShader(&compute);
|
||||
raytracing_program.link();
|
||||
|
||||
|
@ -48,6 +48,14 @@ void drawScreenTriangle(GLuint VAO, GLuint output_texture, GLuint program)
|
||||
glDrawArrays(GL_TRIANGLES, 0, 1 * 3); // size 1
|
||||
}
|
||||
|
||||
//0 output
|
||||
//1 output_accumulation
|
||||
//2 denoising
|
||||
//3 normal
|
||||
//4 position
|
||||
//5 light
|
||||
//6 light_accum
|
||||
//7 color
|
||||
std::vector<GLuint> generateTextures(unsigned int textures_count)
|
||||
{
|
||||
std::vector<GLuint> textures(textures_count);
|
||||
|
@ -27,8 +27,6 @@ void Camera::updateCameraVectors()
|
||||
{
|
||||
glm::vec3 frontTemp;
|
||||
|
||||
std::cout << _yaw << std::endl;
|
||||
|
||||
frontTemp.x = cos(glm::radians(_yaw)) * cos(glm::radians(_pitch));
|
||||
frontTemp.y = sin(glm::radians(_pitch));
|
||||
frontTemp.z = sin(glm::radians(_yaw)) * cos(glm::radians(_pitch));
|
||||
|
@ -252,7 +252,7 @@ void ObjParser::parseMtl(std::stringstream &input_line, Scene &scene)
|
||||
mat->emission_texture_index = -1;
|
||||
mat->refraction = 1.0f;
|
||||
mat->roughness = 1.0f;
|
||||
mat->metallic = 1.0f;
|
||||
// mat->metallic = 1.0f;
|
||||
mat->color = glm::vec3(1.0f, 1.0f, 1.0f);
|
||||
continue;
|
||||
}
|
||||
|
@ -554,7 +554,8 @@ void Renderer::makeMovement(float timeFromStart, float curSplitTimeReset)
|
||||
pathTime = (to.time - from.time) * 60;
|
||||
normalTime = 1 - ((pathTime - timeFromStart) / pathTime);
|
||||
|
||||
pos = hermiteInterpolate((glm::vec3 [4]){prev.pos, from.pos, to.pos, next.pos}, normalTime);
|
||||
glm::vec3 points[4] = {prev.pos, from.pos, to.pos, next.pos};
|
||||
pos = hermiteInterpolate(points, normalTime);
|
||||
|
||||
smallDistPrev = glm::distance((to.dir - from.dir) / glm::vec2(pathTime), (from.dir - prev.dir) / glm::vec2((from.time - prev.time) * 60)) < 40;
|
||||
smallDistNext = glm::distance((to.dir - from.dir) / glm::vec2(pathTime), (next.dir - to.dir) / glm::vec2((next.time - to.time) * 60)) < 40;
|
||||
|