RT Multisampling
This commit is contained in:
parent
3396e69b47
commit
93a90e0291
7 changed files with 120 additions and 37 deletions
|
|
@ -78,6 +78,17 @@ int readRenderSettings(lua_State* L, tp::RayTracer::RenderSettings& settings) {
|
|||
}
|
||||
lua_pop(L, 1); // Pop the 'spray' field
|
||||
|
||||
// Read depth field
|
||||
lua_getfield(L, -1, "multisampling");
|
||||
if (lua_isnumber(L, -1)) {
|
||||
settings.multisampling = (int) lua_tonumber(L, -1);
|
||||
} else {
|
||||
printf("RenderSettings 'depth' field is missing or not a number.\n");
|
||||
lua_pop(L, 1); // Pop the 'depth' field
|
||||
return 0; // Error
|
||||
}
|
||||
lua_pop(L, 1); // Pop the 'depth' field
|
||||
|
||||
return 1; // Success
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,17 @@ Camera = {
|
|||
|
||||
Lights = {
|
||||
{
|
||||
pos = { 4, 2, 3 },
|
||||
intensity = 5
|
||||
}
|
||||
pos = { -0.5, 3.5, 1 },
|
||||
intensity = 1
|
||||
},
|
||||
{
|
||||
pos = { 0, 0, 1 },
|
||||
intensity = 0.5
|
||||
},
|
||||
}
|
||||
|
||||
RenderSettings = {
|
||||
depth = 1,
|
||||
spray = 10,
|
||||
multisampling = 1,
|
||||
}
|
||||
|
|
@ -6,3 +6,21 @@ Camera = {
|
|||
size_x = 400,
|
||||
size_y = 600,
|
||||
}
|
||||
|
||||
|
||||
Lights = {
|
||||
{
|
||||
pos = { -0.5, 3.5, 1 },
|
||||
intensity = 1
|
||||
},
|
||||
{
|
||||
pos = { 0, 0, 1 },
|
||||
intensity = 0.5
|
||||
},
|
||||
}
|
||||
|
||||
RenderSettings = {
|
||||
depth = 1,
|
||||
spray = 10,
|
||||
multisampling = 1,
|
||||
}
|
||||
|
|
@ -20,5 +20,6 @@ Lights = {
|
|||
|
||||
RenderSettings = {
|
||||
depth = 1,
|
||||
spray = 10,
|
||||
spray = 3,
|
||||
multisampling = 16,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue