visualizer experiments
This commit is contained in:
parent
1b7a9c6841
commit
8c904d5c1c
Binary file not shown.
|
@ -235,10 +235,10 @@ ed_sculpture_updated(App_State* state, r32 scale, r32 led_size)
|
|||
{
|
||||
v3 c = pixels.positions[p].xyz;
|
||||
c = HMM_MultiplyVec3f(c, scale);
|
||||
|
||||
u32 pixel_count = pixels_created++;
|
||||
u32 pixel_x = pixel_count % pixels_dim;
|
||||
u32 pixel_y = pixel_count / pixels_dim;
|
||||
|
||||
r32 texel_x_min = (r32)pixel_x / (r32)pixels_dim;
|
||||
r32 texel_y_min = (r32)pixel_y / (r32)pixels_dim;
|
||||
r32 texel_x_max = texel_x_min + texel_dim;
|
||||
|
@ -254,10 +254,6 @@ ed_sculpture_updated(App_State* state, r32 scale, r32 led_size)
|
|||
v3 p2 = HMM_AddVec3(c, (v3){ r, r, 0 });
|
||||
v3 p3 = HMM_AddVec3(c, (v3){ -r, r, 0 });
|
||||
geo_quad_buffer_builder_push_vt(&geo, p0, p1, p2, p3, t0, t1, t2, t3);
|
||||
if (p == 1008)
|
||||
{
|
||||
s32 x = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
geo_vertex_buffers_validate(&geo.buffer_vertex);
|
||||
|
|
|
@ -131,7 +131,7 @@ ed_sculpture_visualizer(App_State* state)
|
|||
glViewport(0, 0, (s32)wds.x, (s32)wds.y);
|
||||
|
||||
m44 ortho = HMM_Orthographic(0, ed->window_dim.x, ed->window_dim.y, 0, 0.01f, 200.0f);
|
||||
m44 scale = HMM_Scale((v3){ed->window_dim.x / 2, ed->window_dim.y / 2, 100});
|
||||
m44 scale = HMM_Scale((v3){ed->window_dim.x / 2, -ed->window_dim.y / 2, 100});
|
||||
m44 pos = HMM_Translate((v3){ed->window_dim.x / 2, ed->window_dim.y / 2, -99});
|
||||
m44 model = HMM_MultiplyMat4(pos, scale);
|
||||
m44 mvp = HMM_MultiplyMat4(ortho, model);
|
||||
|
|
|
@ -20,7 +20,6 @@ global XPlatform_Shader_Program_Src sculpture_shd = {
|
|||
" FragColor = texture(tex, uv);\n"
|
||||
"}"
|
||||
),
|
||||
|
||||
.osx_vert = lit_str(
|
||||
"#version 330 core\n"
|
||||
"layout (location = 0) in vec3 a_pos;\n"
|
||||
|
|
Loading…
Reference in New Issue